
i
i
“K23166” — 2015/1/28 — 9:35 — page 51 — #77
i
i
i
i
i
i
Chapter 5
Common statistical procedures
This chapter describes how to generate univariate summary statistics (such as means, vari-
ances, and quantiles) for continuous variables, display and analyze frequency tables and
cross-tabulations of categorical variables, and carry out a variety of one- and two-sample
procedures.
5.1 Summary statistics
5.1.1 Means and other summary statistics
Example: 5.7.1
mean(x)
or
library(mosaic)
favstats(x, data=ds)
Note: The mean() function accepts a numeric vector or a numeric dataframe as arguments
(date objects are also supported). Similar functions include median() (see ...