fiveval: Calculate the five values of a vector.

Description Usage Arguments Details Value Examples

Description

fiveval is a generalization of fivenum to allow non-numeric input

Usage

1

Arguments

x

vector On which the five values will be calculated.

Details

Unlike fivenum, fiveval returns a character vector and will accept any data type. For non-numerics, each value is just picked out of the ordered list of values using the fivenum indexing scheme. Instead of "median", we use the "2nd Qtl" to make it clear this is not fivenum.

Value

a 5-element character vector with elements named: Min, 1st Qtl, 2nd Qtl, 3rd Qtl, and Max.

Examples

1
2
3
  fiveval(-100:100)
  fiveval(LETTERS)
  fiveval(seq(as.Date("1990-01-01"), as.Date("2009-12-31"), by = 1))

ds4ci/dProf documentation built on May 15, 2019, 2:56 p.m.