descr | R Documentation |
Function computes descriptive statistics for one variable or several variables within a data frame.
descr (variable, na = NA, p.weights = NULL, na.rm = FALSE, verbose=TRUE)
variable |
one variable or a data.frame with several variables |
na |
optional values with should be considered a missing values |
p.weights |
optional: vector with individual weights if weighted statistics should be computed |
na.rm |
logical: should missings be removed prior to estimation? |
verbose |
logical: Print messages to console? |
a data frame with the following columns
N |
number of observations |
N.valid |
number of non-missing observations |
Missing |
number of missings |
Minimum |
minimum of numeric variables |
Maximum |
maximum of numeric variables |
Sum |
sum of numeric variables |
Mean |
arithmetic mean of numeric variables |
std.err |
standard error of the arithmetic mean. Note: for weighted means, standard error
is estimated according to Cochran (1977): |
sig |
p value |
Median |
median of numeric variables |
SD |
standard deviation of numeric variables |
Var |
variance of numeric variables |
Sebastian Weirich
Cochran W. G. (1977). Sampling Techniques (3rd Edn). Wiley, New York
data(mtcars)
descr(mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.