I'm relatively new to R and have been trying to find a solution to this problem for a while. I am trying to take a data frame and essentially do the reverse of rbind, so that I can split an entire data frame (and hopefully preserve the original data frame) into separate vectors, and use the row.names as the source of the new variable names.
So if I have a data.frame like this:
Col1 Col2 Col3
Row1 A B C
Row2 D E F
Row3 G H I
I would like the end result to be separate vectors:
Row1 = A B C
Row2 = D E F
Row3 = G H I
I know I could subset specific rows out of the data.frame, but I want all of them separated. In terms of methodology could I use a for loop to move each row into a vector, but I wasn't exactly sure how to assign row names as variable names.