Learn R Programming

summarytools (version 0.2)

desc: Descriptive Univariate Statistics for Numerical Data

Description

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

Usage

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

Arguments

x
Numerical vector.
na.rm
argument to be passed to statistical functions. Defaults to TRUE.
round.digits
Number of sig. digits to keep. Defaults to 2.
echo
If TRUE, pander tables will be displayed. Defaults to TRUE.
transpose
Makes variables appears as columns, and stats as rows. Defaults to FALSE.
style
Style of pander tables. Defaults to "grid".
justify
Pander argument. Defaults to "right".
plain.ascii
Pander argument. Defaults to TRUE.
file
File name to write output to. Defaults to NA. When this argument is supplied, the table is not echoed to the console. To append output into an existing text file, use append=TRUE.
append
When 'file' argument is supplied, this parameter indicates whether to append output to existing file (TRUE) or to overwrite any existing file (FALSE, default).
...
Additional arguments passed to pander().

Value

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

References

https://github.com/dcomtois/summarytools

Examples

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

Run the code above in your browser using DataLab