rowMedians: Medians of Rows

Description Usage Arguments Value Author(s) See Also Examples

View source: R/colMedians.R

Description

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

Usage

1
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

colMedians,median,colMeans.

Examples

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

Example output

[1] 5 6 7 8

miscTools documentation built on Dec. 9, 2019, 3 a.m.