perc01: Compute specific percentiles of a numeric variable.

View source: R/variable_summaries.R

perc01R Documentation

Compute specific percentiles of a numeric variable.

Description

These are wrappers for the more common quantile function which computes the most commonly used percentiles. Functions beginning with perc compute the corresponding percentile; functions beginning with Q compute the corresponding quartile, and IQR computes the interquartile range.

Usage

perc01(x, na.rm = FALSE, type = 7)

perc05(x, na.rm = FALSE, type = 7)

perc10(x, na.rm = FALSE, type = 7)

perc20(x, na.rm = FALSE, type = 7)

perc80(x, na.rm = FALSE, type = 7)

perc85(x, na.rm = FALSE, type = 7)

perc90(x, na.rm = FALSE, type = 7)

perc95(x, na.rm = FALSE, type = 7)

perc99(x, na.rm = FALSE, type = 7)

Q1(x, na.rm = FALSE, type = 7)

Q3(x, na.rm = FALSE, type = 7)

Arguments

x

numeric vector whose sample quantiles are wanted. NA and NaN values are not allowed in numeric vectors unless na.rm is TRUE.

na.rm

logical; if TRUE, any NA or NaN's are removed from x before the quantiles are computed.

type

an integer between 1 and 9 selecting one of the nine quantile algorithms detailed in quantile.

Functions

  • perc05():

  • perc10():

  • perc20():

  • perc80():

  • perc85():

  • perc90():

  • perc95():

  • perc99():

  • Q1():

  • Q3():

Examples

summarize_variable(mpg ~ 1, data = mtcars, perc01)


reyesem/IntroAnalysis documentation built on March 29, 2025, 3:29 p.m.