tabstat: tabstat

Description Usage Arguments Examples

View source: R/tabstat.R

Description

This function produces descriptive statistics with a flexibility similar to that of the Stata tabstat function. It can produce statstics of any number of groups and subgroups. It can return any percentile value when using "ptileXX.XX" (quotes are required).

Usage

1
tabstat(mydata, myvars, mystats, byvars, roundto = NULL)

Arguments

mydata

A dataframe.

myvars

A character vector of variables to be summarized.

mystats

A list of statistics to be included in the summary. NOTE: This must be included in the command as list() and cannot be a pre-existing object.

byvars

A character vector of by variables (i.e. variables representing groups or subgroups to be included in the summary).

roundto

digits to round to, default does not specify

Examples

1

fiksdala/fiksdal documentation built on Jan. 9, 2022, 10:54 p.m.