# crossTab: Cross tables In rosetta: Parallel Use of Statistical Packages in Teaching

 crossTab R Documentation

## Cross tables

### Description

This function produces a cross table, computes Chi Square, and computes the point estimate and confidence interval for Cramer's V.

### Usage

```crossTab(x, y = NULL, conf.level = 0.95, digits = 2, pValueDigits = 3, ...)

## S3 method for class 'crossTab'
print(x, digits = x\$input\$digits, pValueDigits = x\$input\$pValueDigits, ...)

## S3 method for class 'crossTab'
pander(x, digits = x\$input\$digits, pValueDigits = x\$input\$pValueDigits, ...)
```

### Arguments

 `x` Either a crosstable to analyse, or one of two vectors to use to generate that crosstable. The vector should be a factor, i.e. a categorical variable identified as such by the 'factor' class). `y` If x is a crosstable, y can (and should) be empty. If x is a vector, y must also be a vector. `conf.level` Level of confidence for the confidence interval. `digits` Minimum number of digits after the decimal point to show in the result. `pValueDigits` Minimum number of digits after the decimal point to show in the Chi Square p value in the result. `...` Extra arguments to `crossTab` are passed on to `ufs::confIntV()`.

### Value

The results of `ufs::confIntV()`, but also prints the cross table and the chi square test results.

### Examples

```
crossTab(infert\$education, infert\$induced, samples=50);

```

rosetta documentation built on March 7, 2023, 7:40 p.m.