extract.counts: Extract Contingency Table Arrays

Description Usage Arguments Value See Also Examples

View source: R/contingency.tables.R

Description

Extracts the counts of a contingency.tables object

Usage

1

Arguments

tables

A contingency.table object

Value

A named list of three dimensional arrays. One for each contin.table in tables

See Also

contingency.tables

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
temp.data<-data.frame(a=rnorm(100)>0,b=rnorm(100)>0,gender=rep(c("male","female"),50))
#a vs. b stratified by gender
tab<-contingency.tables(a,b,gender,data=temp.data)
tab

##extract counts
extract.counts(tab)

##Yields something like the following:
#$`a by b`
#, , female
#
#      FALSE TRUE
#FALSE    11    9
#TRUE     15   15
#
#, , male
#
#      FALSE TRUE
#FALSE    10   10
#TRUE     22    8

Deducer documentation built on May 2, 2019, 8:35 a.m.