[R] "sequence of factor settings"?

Liaw, Andy andy_liaw at merck.com
Thu Dec 9 17:27:28 CET 2004

Not sure I completely understood what you want.  If you have factors f1, f2,
..., fk with number of levels n1, n2, ..., nk, then there are n1 * n2 * ...
* nk possible combinations (what you called sequences).  Are you looking for
the 10 combinations that appear most often in a data set?  If so, I would
concatenate the factors together into a character vector (each element would
be a combination), then table() that, and look for the top 10.  The names()
of the output will correspond to the combinations.


> From: Christian Schulz
> Hi,
> exist in any package a function which "work with sequences".
> Easy example 10 factors with 2 levels, are if i'm
> correct theoretical  2^10  "sequences" possible.
> But i have more than 2 levels and perhaps more than 10 factors and 
> interested for the top10 "sequence's"
> with higehest freqs and wish to know which type of sequence it is.
> Many thanks for a starting point
> Christian
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html

More information about the R-help mailing list