printcross {CUFF}R Documentation

Crosstabs print methods

Description

Functions to display (2 x 2) contingency table

Usage

## S3 method for class 'cross'
print(x, ..., test = "chisq.test", export = NULL)

Arguments

x

Object of type cross to print

...

Unused arguments

test

list of statistical tests (as character vector) passed to the 2x2 table. By default, test is set to "chisq.test" which performs a khi-square test with Yates continuity correction.

export

Either "pdf" or "xlsx" or NUll. Crosstab is flushed into either a pdf using latex or an Excel spreadsheet using package openxlsx

Details

Export to "pdf", "xlsx" open the crosstabs in the corresponding formats.

Value

Print methods associated with the cross object.

Author(s)

Charles-Édouard Giguère

Examples

require(CUFF)
### example of crosstabs
cr1 <- cross( ~ N + P, npk)
print(cr1, test = c("chisq.test", "fisher.test"))

[Package CUFF version 1.9 Index]