[R] Adding a row at top of dataframe

Nikhil Kaza nikhil.list at gmail.com
Mon May 17 19:45:14 CEST 2010


Works with warnings for me. but your method is better.

Nikhil


On May 17, 2010, at 1:35 PM, Peter Ehlers wrote:

>> data(cars)
>> cars2 <- cars
>> cars2[2:nrow(cars)+1,] <- cars2[1:nrow(cars),]
>> cars2[1,] <- NA



More information about the R-help mailing list