numSummary
creates neatly formatted tables of means, standard deviations, coefficients of variation,
skewness, kurtosis, and quantiles of numeric variables.numSummary(data,
statistics=c("mean", "sd", "quantiles", "cv", "skewness", "kurtosis"),
type=c("1", "2", "3"),
quantiles=c(0, .25, .5, .75, 1), groups)
## S3 method for class 'numSummary':
print(x, ...)
"mean"
, "sd"
, "quantiles"
,
"cv"
(coefficient of variation --- sd/mean), "skewness"
, or "kurtosis"
,
defaulting to the first three.link[e1071]{skewness}
and link[e1071]{kurtosis}
functions in the "1"
.c(0, 0.25, 0.5, 0.75, 1)
."numSummary"
to print.numSummary
returns an object of class "numSummary"
containing the table of
statistics to be reported along with information on missing data, if there are any.mean
, sd
, quantile
,
link[e1071]{skewness}
, link[e1071]{kurtosis}
.library(car)
Prestige[1, "income"] <- NA
numSummary(Prestige[,c("income", "education")],
statistics=c("mean", "sd", "quantiles", "cv", "skewness", "kurtosis"))
numSummary(Prestige[,c("income", "education")], groups=Prestige$type)
remove(Prestige)
Run the code above in your browser using DataLab