Learn R Programming

summarytools (version 0.1)

unistats: Univariate Statistics for Numerical Data

Description

Calculates mean, standard deviation, min, max, median, IQR, skewness, str.err skewness, and kurtosis. Optionally uses package 'pander' to display pretty tables.

Usage

unistats(x, na.rm=TRUE, round.digits=2, echo=TRUE, style="grid",
         justify="right", plain.ascii=TRUE, display.label=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.
style
Style of pander tables. Defaults to "grid".
justify
Pander argument. Defaults to "right".
plain.ascii
Pander argument. Defaults to TRUE.
display.label
If TRUE, Hmisc-type labels will be displayed. Defaults to FALSE.
...
Additional arguments passed to pander().

Value

  • A list containing the variable's name, label if applicable, table of statistics and table of counts (valid vs observations).

Examples

Run this code
data(cars)
unistats(cars$speed)
unistats(cars$speed, echo=FALSE)

Run the code above in your browser using DataLab