Learn R Programming

crunch (version 1.14.4)

crtabs: Crunch xtabs: Crosstab and otherwise aggregate variables in a Crunch Dataset

Description

Create a contingency table or other aggregation from cross-classifying variables in a CrunchDataset.

Usage

crtabs(formula, data, weight = crunch::weight(data), useNA = c("no", "ifany", "always"))

Arguments

formula
an object of class 'formula' object with the cross-classifying variables, separated by '+', on the right hand side. Compare to xtabs.
data
an object of class CrunchDataset
weight
a CrunchVariable that has been designated as a potential weight variable for data, or NULL for unweighted results. Default is the currently applied weight, weight(data).
useNA
whether to include missing values in tabular results. See table.

Value

an object of class CrunchCube