Hello everyone, I use the split function splitting with the f function on a 3 columns and more than 100 000 rows data frame. Once it's split I have a list of data frames still with 3 columns and n rows. I manipulate those list elements and get a list of data frames still with 3 columns but less rows. So when I unsplit it, I get an error as I use the same factor function I used to split ( f in the help split page) I guess because the number of rows changed. Do I need to create a new f function to be able to unsplit or is there another way to unsplit those data frames and rbind them? Thank you! ----- Anna Lippel -- View this message in context: http://n4.nabble.com/Using-split-and-then-unsplit-tp2016071p2016071.html Sent from the R help mailing list archive at Nabble.com.
here is an alternative that I just found to join my data frames with rbind: result <- do.call("rbind", myList) It worked perfectly but I still don't understand why unsplit wouldn't work... ----- Anna Lippel -- View this message in context: http://n4.nabble.com/Using-split-and-then-unsplit-tp2016071p2016081.html Sent from the R help mailing list archive at Nabble.com.
On Apr 19, 2010, at 11:06 AM, anna wrote:> > Hello everyone, > I use the split function splitting with the f function on a 3 > columns and > more than 100 000 rows data frame. Once it's split I have a list of > data > frames still with 3 columns and n rows. I manipulate those list > elements and > get a list of data frames still with 3 columns but less rows. So > when I > unsplit it, I get an error as I use the same factor function I used > to split > ( f in the help split page) I guess because the number of rows > changed. Do I > need to create a new f function to be able to unsplit or is there > another > way to unsplit those data frames and rbind them? Thank you!You may get success with: do.call(rbind, splitted) The other task to set for yourself is to read the Posting Guide again and create test cases when posting to r-help. -- David Winsemius, MD West Hartford, CT