summary_statistics: summary_statistics() Creates summary statistics table of all...

View source: R/summary_statistics.R

summary_statisticsR Documentation

summary_statistics() Creates summary statistics table of all numeric variables in data

Description

summary_statistics() Creates summary statistics table of all numeric variables in data

Usage

summary_statistics(
  data,
  probs = c(0, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 1),
  na.rm = T
)

Arguments

data

A data.frame, tibble or data.table

probs

The quantiles to compute. Default is c(0, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 1)

na.rm

whether to exclude NA's from calculations

Details

This function computes the selected quantiles, mean and N values of all the numeric columns of data.

Value

A tibble with the Mean, N (not NA) and probs selects for each numeric column

Examples

data <-data.frame(x = c(1:5), y = c(100, 200, 300, 410, 540), z = rep("c", 5))
summary_statistics(data)

RCT documentation built on May 13, 2022, 9:06 a.m.