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

View source: R/forODFTable.R

forODFTableR Documentation

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.

Author(s)

Jakson A. Aquino jalvesaq@gmail.com.

See Also

CrossTable

Examples

## 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)

## End(Not run)

descr documentation built on Nov. 28, 2023, 1:10 a.m.