[R] Inverting data frame...row wise

Julian Burgos jmburgos at u.washington.edu
Fri Sep 26 02:09:35 CEST 2008


How about something like

my.data=my.data[,4:1]

Julian

milicic.marko wrote:
> Hi,
> 
> I have the data.frame with 4 columns. I simply want to invert dataset
> so that last row becomes first...
> 
> I tried with rev(my_data-frame) but I got my columns inverted... not
> my rows
> 
> 
> Thanks
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list