descr (version 1.1.4)

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, …)

Arguments

x

A object of class CrossTable.

digits

See round.

Optional arguments passed to format.

Value

A matrix.

See Also

CrossTable

Examples

Run this code
# NOT RUN {
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