describe_data {tidystats} | R Documentation |
Calculate common descriptive statistics
Description
describe_data()
returns a set of common descriptive statistics
(e.g., number of observations, mean, standard deviation) for one or more
numeric variables.
Usage
describe_data(data, ..., na.rm = TRUE, short = FALSE)
Arguments
data |
A data frame. |
... |
One or more unquoted column names from the data frame. |
na.rm |
A boolean indicating whether missing values (including NaN) should be excluded in calculating the descriptives? The default is TRUE. |
short |
A boolean indicating whether only a subset of descriptives
should be reported? If set to |
Details
The data can be grouped using dplyr::group_by()
so that
descriptives will be calculated for each group level.
Skew and kurtosis are based on the datawizard::skewness()
and
datawizard::kurtosis()
functions (Komsta & Novomestky, 2015).
Examples
describe_data(quote_source, response)
describe_data(quote_source, response, na.rm = FALSE)
quote_source |>
dplyr::group_by(source) |>
describe_data(response)
quote_source |>
dplyr::group_by(source) |>
describe_data(response, short = TRUE)
[Package tidystats version 0.6.2 Index]