Learn R Programming

summarytools (version 0.3)

descr: Descriptive Univariate Statistics for Numerical Data

Description

Calculates mean, standard deviation, min, max, median, MAD, IQR, CV, skewness, SE.skewness, and kurtosis.

Usage

descr(x, na.rm=TRUE, style="simple", round.digits=2,
     justify="right", plain.ascii=TRUE, file=NA,
     append=FALSE, transpose=FALSE, ...)

Arguments

x
Numerical vector.
na.rm
argument to be passed to statistical functions. Defaults to TRUE.
style
Style of pander tables. Defaults to dQuote{grid}.
round.digits
Number of sig. digits to keep. Defaults to 2.
justify
pander argument. Defaults to right.
plain.ascii
pander argument; when results are displayed in console, this avoids having markdown markup characters int the tables. Defaults to TRUE.
file
File name to write output to. Defaults to NA. To append output to an existing text file, use append=TRUE.
append
When file argument is supplied, this indicates whether to append output to existing file (TRUE) or to overwrite any existing file (FALSE, default). If TRUE and no file exists, a new file will be crea
transpose
Makes variables appears as columns, and stats as rows. Defaults to FALSE.
...
Additional arguments passed to pander.

Value

  • A list with 2 elements; first one in a matrix (table) containing all the stats. Second, a table of statistics and table of counts (valid vs observations).

References

https://github.com/dcomtois/summarytools

Examples

Run this code
data(iris)
descr(iris)
descr(iris, transpose=TRUE)

Run the code above in your browser using DataLab