mtable {rimu}R Documentation

Tables involving multiple-response objects

Description

Creates one-way and two-way tables using every level of a multiple response object. Use table(as.character(x)) to tabulate combinations of levels

Usage

mtable(x, y, na.rm = TRUE)

Arguments

x

mr object or a factor

y

mr object or a factor

na.rm

remove missing values?

Value

A 1-d or 2-d array with names giving the levels

Examples

data(ethnicity)
mtable(ethnicity)
table(as.character(ethnicity))

data(nzbirds)
nzbirds<-as.mr(nzbirds)

## co-occurence table
mtable(nzbirds, nzbirds)

## table by a factor
v<-rep(c("A","B"),3)
mtable(nzbirds,v)

data(nzbirds)
mtable(nzbirds>0)


[Package rimu version 0.6 Index]