Learn R Programming

memisc (version 0.11-6)

wtable: One-Dimensional Table of Frequencies with Weights

Description

'wtable' is a helper function for aggregate.formula and genTable. It is useful to recast a contingency table into a format suitable for binomial logit analysis.

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