Learn R Programming

descr (version 1.1.8)

forODFTable: Convert an object of class CrossTable into a matrix for odfTable

Description

The function converts an object of class CrossTable into a matrix to be printed by odfTable() of odfWeave package.

Usage

forODFTable(x, digits = 1, ...)

Value

A matrix.

Arguments

x

A object of class CrossTable.

digits

See round.

...

Optional arguments passed to format.

Author

Jakson A. Aquino jalvesaq@gmail.com.

See Also

CrossTable

Examples

Run this code
if (FALSE) {
library(odfWeave)
data(infert, package = "datasets")
x <- crosstab(infert$education, infert$induced, expected = TRUE)

# Use the function directly:
odfTable(forODFTable(x))

# Create a method for odfTable:
odfTable.CrossTable <- function(x) odfTable(forODFTable(x))
odfTable(x)
methods(odfTable)
}

Run the code above in your browser using DataLab