In R: Is there an automated way to get the colnames of a dataframe (for example: mtcars):
colnames(mtcars)
output: [1] "mpg" "cyl" "disp" "hp" "drat" "wt" "qsec" "vs" "am" "gear" "carb"
to a concatenated vector like this:
c("mpg", "cyl", "disp", "hp", "drat", "wt", "qsec", "vs", "am", "gear", "carb")