ordinal_median: Take the Median of Ordinal Data

Description Usage Arguments Value Examples

Description

This function is used to take the median of an ordered factor, where the output retains the metadata associated with the factor.

Usage

1
ordinal_median(ordinal_vector, ...)

Arguments

ordinal_vector

The ordered factor data to be processed.

...

Any additional arguments to be passed directly to the median function.

Value

Returns a single value representing the median of the input data. However, all of the metadata around the levels and labeling will be retained.

Examples

1
2
x <- ordered(c("a","b","b"), levels=c("a", "b"))
ordinal_median(x)

jmiahjones/lunch.time documentation built on May 29, 2019, 1:05 a.m.