Compute the sample medians of the rows of a data.frame or matrix.
rowMedians( x, na.rm = FALSE )
a data.frame or matrix.
a logical value indicating whether NA values should be
stripped before the computation proceeds.
A vector of the medians of each row of x.
m <- matrix( 1:12, nrow = 4 )
rowMedians( m )
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.