forODFTable {descr}R 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)

[Package descr version 1.1.8 Index]