A relatively simple question, but the answer seems to have eluded me. Currently, I have a data frame which looks similar to this:
0 0 0 1 1
0 1 0 1 1
2 1 1 0 3
I'm trying to turn this into a single line of data, by rows. I used the unlist
function, and it did what I wanted, but gave them to me by columns. It gave me this:
0,0,2,0,1,1,0,0,1,1,1,0,1,1,3
but what I want is this:
0,0,0,1,1,0,1,0,1,1,2,1,1,0,3
I apologize if this seems like a silly question, but I'm still a novice with R. Any help (or referrals to functions which might help me process this) would be greatly appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…