summary_num | R Documentation |
Summary statistics for numeric variables.
summary_num(
x,
type = FALSE,
other_means = FALSE,
skewness = FALSE,
kurtosis = FALSE
)
x |
A numeric vector |
type |
A boolean value, if TRUE the function will add metrics related to the variables type (default = TRUE) |
other_means |
A boolean value, if TRUE the function will add the harmonic and geometric means (default = FALSE) |
skewness |
A boolean value, if TRUE the function will add the skewness coefficients (default = FALSE) |
kurtosis |
A boolean value, if TRUE the function will add the kurtosis coefficients (default = FALSE) |
By default the summary statistics are:
- min: the minimum;
- p25: the first quartile;
- p50: the second quartile (median);
- p75: the third quartile;
- max: the maximum;
- mode: the peak density value;
- mean: the mean;
- cv: the coefficient of variation.
If 'type' = TRUE, the following metrics will be added:
- n: the number of observations;
- na: the number of missing values;
- negative: the number of negative values;
- equal_zero: the number of values equal to zero;
- positive: the number of positive values.
If 'other_means' = TRUE, the following metrics will be added:
- geometric_mean: the geometric mean;
- harmonic_mean: the harmonic mean.
If 'skewness' = TRUE, the following metrics will be added:
- Bowley
- Fisher-Pearson
- Kelly
- Rao
- Pearson median
If 'kurtosis' = TRUE, the following metrics will be added:
- Bowley
- Fisher-Pearson
- Kelly
- Rao
- Pearson median
A tibble with the summary metrics.
x <- c(rnorm(10),NA,10)
x
summary_num(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.