Skip to content
Prev 332912 / 398503 Next

Tables Package Grouping Factors

On 13-11-09 1:23 PM, Jeff Newmiller wrote:
I forgot, there's a simpler way to do this.  Build the full table with 
the junk values, then take a subset:

full <- tabular( Sex*Name ~ Heading()*When * Weight * 
Heading()*identity, data=sampledf )

full[c(1:3, 10:12), ]

Figuring out which rows you want to keep can be a little tricky, but 
doing something like this might be good:

counts <- tabular( Sex*Name ~ 1, data=sampledf )
full[ as.logical(counts), ]

Duncan Murdoch