Re: [R] Insert rows in between dataframes

2009-08-20 Thread Henrique Dallazuanna
Try this also: as.data.frame(t(sapply(append(split(mydata, row.names(mydata)), list(c('f', 6)), after = 2), as.matrix))) The after argument of append can be the line number where you want the new line. On Thu, Aug 20, 2009 at 8:18 AM, Moumita Das wrote: > Hi all, > > Can anyone suggest me how t

Re: [R] Insert rows in between dataframes

2009-08-20 Thread John Kane
There may be a much cleaner and better way but just split the data.frame into two parts, create the NA rows as another data.frame and use rbind to put them back together again. Example #=== (mydata <- data.frame(aa=letters[1:5],