[R] Merging tables of differing lengths

hadley wickham h.wickham at gmail.com
Tue Oct 17 22:39:19 CEST 2006


>    What I want to do is merge these two tables into a 2X10 table in order
>    to  do a chi-square test.  Given the unequal number of columns, all my

You might want to try something like:

levs <- unique(c(wintype1, wintype2))
table(factor(wintype1, levels=lev))
table(factor(wintype2, levels=lev))


Hadley



More information about the R-help mailing list