tab_df: Return a table as as data frame

Description Usage Arguments Details

Description

Return a table as as data frame

Usage

1
tab_df(data, fmla, ...)

Arguments

data

a data frame

fmla

a one-sided or two-sided formula

...

other arguments to tab

Details

The right hand side of 'fmla' is used for the dimensions of the table. The left-hand side, if present, is summed to generate the values in the cells of the table. If there is no left-hand side, cell frequencies are shown.

tab_df(data, fmla) is similar in effect to as.data.frame(tab_(data, fmla)) except that the former uses the name in the LHS of fmla as a variable name for counts while the latter uses 'Freq'. Also, tab_df preserved ordered factors.


gmonette/WWCa documentation built on May 17, 2019, 7:25 a.m.