KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a dataframe with numeric entries like this one test <- data.frame(x = c(26, 21, 20), y = c(34, 29, 28)) How can I get the following vector? > 26, 34, 21, 29, 20, 28 I was able to get it using the following, but I guess there should be a much more elegant way X <- test[1, ] for (i in 2:dim(test)[ 1 ]){ X <- cbind(X, test[i, ]) }
Tags (comma-separated)
Save Edits
Cancel