[R] show unique combination of two factor

Michael Dewey info at aghmed.fsnet.co.uk
Fri Nov 24 13:11:10 CET 2006


At 22:02 23/11/2006, Aimin Yan wrote:
>p factor have 5 levels
>aa factor have 19 levels.
>totally it should have 95 combinations.
>but I just find there are 92 combinations.
>Does anyone know how to code to find what combinations are missed?

Does
which(table(p,aa) == 0, arr.ind=TRUE)
do what you wanted.



>Thanks,
>
>Aimin
>
>

Michael Dewey
http://www.aghmed.fsnet.co.uk



More information about the R-help mailing list