p50: Compute the sample 50th percentile (median).

View source: R/btools_stats.r

p50R Documentation

Compute the sample 50th percentile (median).

Description

Compute the sample 50th percentile (median).

Usage

p50(x, na.rm = FALSE)

Arguments

x

a numeric vector containing the values whose 50th percentile is to be computed.

na.rm

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

Value

numeric

Examples

p50(1:100)
p50(c(1:10, NA, 11:100), na.rm=TRUE)

donboyd5/btools documentation built on Jan. 7, 2023, 10:47 p.m.