Learn R Programming

memisc (version 0.11-11)

wtable: One-dimensional table of (weighted) frequencies

Description

'wtable' is a helper function for aggregate.formula and genTable. It can be used to recast a contingency table into a format needed for binomial logit analyses.

Usage

wtable(x,w=NULL)

Arguments

x
a factor
w
a numeric vector of weights of the same length as x.

Value

  • A (one-dimensional) table of counts.

Examples

Run this code
aggregate(wtable(Admit,Freq)~.,data=UCBAdmissions)

Run the code above in your browser using DataLab