Skip to content

high-dimensional contingency table

2 messages · Claudia Rodriguez, David Winsemius

#
On May 23, 2010, at 8:41 PM, Claudia Rodriguez wrote:

            
mosaic's help page says you need to supply a data.frame or a  
contingency table. Given that you do not have separate records for  
each individual, but rather have counts in the last column, you can  
use xtabs to create a table object. Note the help page of xtabs says:

## xtabs() <-> as.data.frame.table()
You need to tell xtabs which column has the counts.

xtabs(conteos ~.,dta)
mosaic( cat.gru ~a?o, data = xtabs( conteos ~., dta))