Multitables, or "banners" or "crossbreaks", define a set of variables or or query expressions to crosstab with as a unit. They are used in the Crunch web app to display tables side by side, as well as to define one dimension of a tab book.

newMultitable(formula, data, name, ...)

Arguments

formula

an object of class 'formula' object with the cross-classifying variables separated by '+' on the right-hand side. Following how stats::formula() works in R, it should start with "~". Variables on left-hand side of the formula have no meaning in this function.

data

an object of class CrunchDataset in which to create the multitable, and to which the variables referenced in formula belong.

name

character name to give the new multitable object. If omitted, a default name will be derived from formula.

...

Additional multitable attributes to set. Options include is_public.

Value

An object of class Multitable

See also

Examples

if (FALSE) {
m <- newMultitable(~ gender + age4 + marstat, data = ds)
name(m) # [1] "gender + age4 + marstat"
}