Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rowMedians

Medians of Rows


Description

Compute the sample medians of the rows of a data.frame or matrix.

Usage

rowMedians( x, na.rm = FALSE )

Arguments

x

a data.frame or matrix.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Value

A vector of the medians of each row of x.

Author(s)

Arne Henningsen

See Also

Examples

m <- matrix( 1:12, nrow = 4 )
   rowMedians( m )

miscTools

Miscellaneous Tools and Utilities

v0.6-26
GPL (>= 2)
Authors
Arne Henningsen, Ott Toomet
Initial release
2019-12-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.