newMultitable: Create a new Multitable

Description Usage Arguments Value See Also Examples

View source: R/multitables.R

Description

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.

Usage

1

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

stats::formula

Examples

1
2
3
4
5
## Not run: 
m <- newMultitable(~ gender + age4 + marstat, data=ds)
name(m) # [1] "gender + age4 + marstat"

## End(Not run)

crunch documentation built on Jan. 11, 2019, 1:06 a.m.