Learn R Programming

summarytools (version 0.1)

dfSummary: Dataframe Summary

Description

Summary of a dataframe consisting of: variable names and labels, factor levels, frequencies or numerical summary statistics, and valid/missing observations information. Optionally uses package 'pander' to display pretty tables.

Usage

dfSummary(x, echo=TRUE, style="grid", justify="left",
          max.distinct.values=10, str.distinct.values="distinct values",
          trim.strings=FALSE, max.string.width=15, round.digits=2,
          file=NA, display.labels=FALSE, ...)

Arguments

x
A dataframe.
echo
If TRUE (default), pander tables will be displayed and resulting dataframe will be returned silently.
style
The style to be used in pander table. Defaults to "grid".
justify
Pander argument. Defaults to "left".
max.distinct.values
The maximum number of items to be displayed in the frequency cell. If variable has more distinct values, no frequency will be shown (only a message stating the number of distinct values).
str.distinct.values
For internationalization; defaults to "distinct values".
trim.strings
For character variables, remove any white space at the beginning or end of the string. This will impact the frequencies so interpret the frequency tables accordingly. Defaults to FALSE.
max.string.width
Limits the number of characters to display in the frequency tables. Defaults to 15.
round.digits
Number of digits for rounding (used in numerical stats and in freq tables).
file
The text file to be written to disk. Defaults to NA.
display.labels
If TRUE,a column containing Hmisc-type labels will be displayed. Defaults to FALSE.
...
Additional arguments passed to pander().

Value

  • A dataframe containing as many rows as there are columns in x.

See Also

summary.data.frame

Examples

Run this code
dfSummary(iris)

Run the code above in your browser using DataLab