xtabs: Cross tabulation

Description Usage Arguments Value See Also Examples

Description

xtabs creates a contingency table (optionally a sparse matrix) from cross-classifying factors, usually contained in a data-frame-like object, using a formula interface.

NOTE: This man page is for the xtabs S4 generic function defined in the BiocGenerics package. See ?stats::xtabs for the default method (defined in the stats package). Bioconductor packages can define specific methods for objects not supported by the default method.

Usage

1
2
xtabs(formula=~., data=parent.frame(), subset, sparse=FALSE, 
      na.action, exclude=c(NA, NaN), drop.unused.levels=FALSE)

Arguments

formula, subset, sparse, na.action, exclude, drop.unused.levels

See ?stats::xtabs for a description of these arguments.

data

A data-frame-like object.

Value

See ?stats::xtabs for the value returned by the default method.

Specific methods defined in Bioconductor packages should also return the type of object returned by the default method.

See Also

Examples

1
2
3
xtabs  # note the dispatch on the 'data' arg only
showMethods("xtabs")
selectMethod("xtabs", "ANY")  # the default method

nturaga/BiocGenerics documentation built on May 7, 2019, 11:15 a.m.