Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

printcross

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

CUFF

Charles's Utility Function using Formula

v1.7
GPL (>= 2)
Authors
Charles-Édouard Giguère
Initial release
2020-09-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.