tabstat: Tabstat

Description Usage Arguments Value

Description

Creates a 'tabstat' summary statistic table, similar to the ones produced in Stata.

Usage

1
2
tabstat(var, data, by = NULL, fns = list(mean, sd, min, median, max,
  length), na.rm = TRUE)

Arguments

var

The variable to be summarised. Must be entered as character.

data

The data frame to be summarised.

by

A string of character variables to group summaries into.

fns

A list of summary functions. Use 'length' for rowcounts by category. Default already contains many useful statistics.

na.rm

Logical, whether or not to remove NAs. Defaults to true.

Value

A dataframe of summary statistics.


TimothyKBook/rutilstb documentation built on May 9, 2019, 4:48 p.m.