Creating empty dataframe with column names as in a vector

I have a vector say x <- c('a','b','c')
now I want to create an empty dataframe with column names as those in x. Values in x can be any character value, doesn't need to be a,b,c necessarily.

1 Like