descr (or descriptives)
This function provides a number of descriptives about your data, similar to what SPSS's DESCRIPTIVES (often called with DESCR) does.
descr(x, digits = 4, errorOnFactor = FALSE, include = c("central tendency", "spread", "range", "distribution shape", "sample size"), t = FALSE, conf.level=.95, quantileType = 2);
- The vector for which to return descriptives.
- The number of digits to round the results to when showing them.
- Whether to show an error when the vector is a factor, or just show the frequencies instead.
- Which elements to include when showing the results.
- Whether to transpose the dataframes when printing them to the screen (this is easier for users relying on screen readers).
- Confidence of confidence interval around the mean in the central tendency measures.
The type of quantiles to be used to compute the interquartile range (IQR). See
quantilefor more information.
Note that R (of course) has many similar functions, such as
describe in the excellent
The Hartigans' Dip Test may be unfamiliar to users; it is a measure of uni- vs. multidimensionality, computed by
dip.test from the
dip.test package. Depending on the sample size, values over .025 can be seen as mildly indicative of multimodality, while values over .05 probably warrant closer inspection (the p-value can be obtained using
dip.test; also see Table 1 of Hartigan & Hartigan (1985) for an indication as to critical values).
A list of dataframes with the requested values.
Hartigan, J. A.; Hartigan, P. M. The Dip Test of Unimodality. Ann. Statist. 13 (1985), no. 1, 70--84. doi:10.1214/aos/1176346577. http://projecteuclid.org/euclid.aos/1176346577.