I have a vector like this:
dput(xv)
c("Users", "Transactions", "Workload")
I need to be able to create an empty data frame based on entries in vector xv using a function.
For example, it should be like this:
new_df <- data.frame(
Users = character(),
Transactions = character(),
Workload = character()
)
since the values in xv could change and number of entries in xv could also change, I need to be able to do this using a function?
Any ideas how I could do this?