fivenumBy: Five number summary for a variable in a data.frame, by a...

Description Usage Arguments Details Value

View source: R/autoHelpers.R

Description

Five number summary for a variable in a data.frame, by a subsetting variable

Usage

1
fivenumBy(x, what, which, type = 3, N = FALSE)

Arguments

x

A data.frame

what

A character string giving the name of the variable to be summarized

which

A character string giving the name of the subsetting variable

type

A number passd into quantile telling it how to compute the quantiles. Defaults to type=3 which should give output that matches the default output from SAS.

N

Whether to include the sample size in the summary (making it a 6 number summary). Defaults to N=FALSE.

Details

The 'five number summary' is the minimum, quartiles and maximum, where the quartiles are computed using SAS's default approach. These will generally not be the same as the hinges as originally described by Tukey.

Value

A matrix, each row of which gives the five number summary of x[, what] for each value of x[, which].


harrysouthworth/margarita documentation built on Aug. 19, 2021, 5 a.m.