descriptives: Descriptive Statistics on variables within a data frame

Description Usage Arguments Value Examples

View source: R/descriptives.R

Description

The descriptives function is used to perform descriptive statistics on a set of variables in a data.frame. This can include descriptive statistics by group when including a vector of categorical variables in the groupby= argument.

Usage

1
2
3
4
5
6
7
8
9
descriptives(
  data,
  vars,
  groupby = NULL,
  conf.level = 0.95,
  medianCI = FALSE,
  R = 2000,
  round = NULL
)

Arguments

data

A data.frame containing columns of variables.

vars

A vector of variable names existing in the dataframe to perform descriptive statistics on.

groupby

An optional vector containing factor names within a dataframe used for by group processing.

conf.level

The confidence level for mean and median confidence intervals. The default value is 0.95.

medianCI

A TRUE/FALSE boolean value indicating whether or not to produce bootstrapped confidence intervals on the median (computationally intensive).

R

The number of bootstrap replications to use if medianCI = TRUE. Otherwise has no effect.

round

The number of digits to round the final result.

Value

A list containing descriptive statistics for each variable listed in the vars statement.

Examples

1
descriptives(data=mtcars, vars=c("mpg","disp"), groupby=c("vs","am"))

jprice80/fullprocs documentation built on June 13, 2020, 11:09 p.m.