distros: Summarize distribution of a continuous variable

Description Usage Arguments Value

Description

Summarize distribution of a continuous variable

Usage

1
distros(column_names, data, probs = NULL, digits = 2L)

Arguments

column_names

Character vector with names of continuous variables

data

Data frame containing variables 'column_names'

probs

Percentages for which to include percentiles

digits

Number of decimal digits to use

Value

A data frame with columns "variable", "N", "NAs", "mean", "sd", "iqr", "min", percentiles, "max". The "variable" column contains the 'column_names'. The "N" column contains the total number of observations per variable. The "NAs" column contains the number of missing observations for each variable. The "mean", "sd", "iqr", "min", and "max" variables contain the mean, standard deviation, inter-quartile range, minimum, and maximum of each variable, respectively. The names of the percentile columns between the "min" and the "max" column all start with "p" followed by the percentage corresponding to the percentile. The 5 while the 50 called "p50".


cbaumbach/manyregs documentation built on May 13, 2019, 1:48 p.m.