summarizeNumerics {rockchalk} | R Documentation |
Extracts numeric variables and presents an summary in a workable format.
Description
Finds the numeric variables, and ignores the others. (See
summarizeFactors
for a function that handles non-numeric
variables). It will provide quantiles (specified probs
as
well as other summary statistics, specified stats
. Results
are returned in a data frame. The main benefits from this compared
to R's default summary are 1) more summary information is returned
for each variable (dispersion), 2) the results are returned in a
form that is easy to use in further analysis, 3) the variables in
the output may be alphabetized.
Usage
summarizeNumerics(
dat,
alphaSort = FALSE,
probs = c(0, 0.5, 1),
stats = c("mean", "sd", "skewness", "kurtosis", "nobs", "nmiss"),
na.rm = TRUE,
unbiased = TRUE,
digits = 2
)
Arguments
dat |
a data frame or a matrix |
alphaSort |
If TRUE, the columns are re-organized in alphabetical order. If FALSE, they are presented in the original order. |
probs |
Controls calculation of quantiles (see the R
|
stats |
A vector including any of these: |
na.rm |
default TRUE. Should missing data be removed to calculate summaries? |
unbiased |
If TRUE (default), skewness and kurtosis are calculated with biased corrected (N-1) divisor in the standard deviation. |
digits |
Number of digits reported after decimal point. Default is 2 |
Value
a data.frame with one column per summary element (rows are the variables).
Author(s)
Paul E. Johnson pauljohn@ku.edu
See Also
summarize and summarizeFactors