Sorry for the basic question here!
I am working the following type of dataset:
data <- data.frame(a=c(1,2,3), b=c(2,3,4), c=(10,11,12))
I am trying to turn it into a new data frame where there is only one column, containing all of these values in individual rows, i.e. a=c(1,2,3,2,3,4,10,11,12)
What function should I use to arrive at this output?
All the best,
Cameron
You can do data.frame(a = unlist(data))
.