sapply(nrow(matrix):1, function(x) matrix[x,])


On Mon, 8 Aug 2005, Jake wrote:

> Quick question:  how can I reverse the order of the rows in a matrix?
> i.e. make the last row first and the first row last, etc.?
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to