sumStats | R Documentation |
Provides summary statistics (mean, sd, quartiles, IQR, missing n, valid n) for the variables in a data frame.
sumStats(data, vars, byvar = NULL, convertFactors = TRUE)
data |
A data frame from which variables will be extracted. |
vars |
A character vector of variable names. |
byvar |
A character string giving a variable name of a stratifying variable. The summaries of the |
convertFactors |
Logical indicating whether factors should be converted to numeric first and then summarised. |
a matrix of summary statistics for variables, optionally by the values of another variable.
a vector of summary statistics for each variable or variable-group combination.
data(aclp)
sumStats(aclp, vars=c("gdpw", "popg"), byvar="democ")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.