meadian: Median for an ordinal variable

View source: R/meadian.R

meadianR Documentation

Median for an ordinal variable

Description

This function simply computes median of ordinal variable, with one modification: if the median is between two values, the larger or smaller value is returned, depending if the mean is larger or smaller.

Usage

meadian(v)

Arguments

v

A vector of numeric values

Value

The median as an average of the mean and default median of v.

Author(s)

Philip T. Reiss and Prince P. Osei

Examples

data(cars)           
meadian(cars$dist)     

oseipep/store documentation built on June 30, 2022, 4:43 a.m.