If you want to write a file along the way (for example, in a loop):
seq1<-t(seq(1,20,1)) seq2<-t(seq(21,40,1)) write.table(seq1,"test.csv",sep=",",append=TRUE,row.names=FALSE,col.names=FALSE) write.table(seq2,"test.csv",sep=",",append=TRUE,row.names=FALSE,col.names=FALSE)
Then transpose the file at the end. If you want to do everything at once:
test<-t(rbind(seq1,seq2)) write.csv(test, "test.csv")
sherminds
source share