describe {psyntur} | R Documentation |
Calculate descriptive statistics
Description
This function is a lightweight wrapper to dplyr
's summarize
function.
It can be used to calculate any descriptive or summary statistic for any
variable in the data set. Optionally, a by
grouping variable can be used,
and then the summary statistics are calculated for each subgroup defined by
the different values of the by
variable.
Usage
describe(data, by = NULL, ...)
Arguments
data |
A data frame |
by |
A grouping variable. If included, the |
... |
Arguments of functions applied to variables, e.g. |
Value
A tibble data frame with each row providing descriptive statistics
for selected variables for each value of the grouping by
variable.
Examples
describe(faithfulfaces, avg = mean(faithful), stdev = sd(faithful))
describe(faithfulfaces, by = face_sex, avg = mean(faithful), stdev = sd(faithful))
[Package psyntur version 0.1.0 Index]