powered by
Compute the sample medians of the rows of a data.frame or matrix.
rowMedians( x, na.rm = FALSE )
A vector of the medians of each row of x.
x
a data.frame or matrix.
a logical value indicating whether NA values should be stripped before the computation proceeds.
NA
Arne Henningsen
colMedians,median,colMeans.
colMedians
median
colMeans
m <- matrix( 1:12, nrow = 4 ) rowMedians( m )
Run the code above in your browser using DataLab