describe: Descriptive statistics

View source: R/describe.R

describeR Documentation

Descriptive statistics

Description

Compute and print descriptive statistics for a matrix or data frame, eventually conditioning on another variable.

Usage

describe(data, by, detailed = FALSE, ...)
## S3 method for class 'describe'
print(x, digits = getOption("digits") - 3, ...)

Arguments

data

a matrix or data frame.

by

a factor or character vector specifying the conditioning variable. This may be a variable included in data or an object defined in the current environment.

detailed

a logical specifying if detailed statistics should be provided.

...

additional arguments to be passed to the generic function.

x

an object of class 'describe'.

digits

the number of significant digits to use.

Details

This function provides simple descriptive statistics for different types of variables, such as numeric, factor, and logical, conditioning or not on another variable.

Author(s)

Luca Scrucca

See Also

summary, by

Examples

data(warpbreaks)
describe(warpbreaks)
describe(warpbreaks, detail = TRUE)
describe(warpbreaks, by = wool)

luca-scr/qcc documentation built on Feb. 25, 2023, 3:33 p.m.