[R] combination which limited - thanks again
subianto at gmail.com
Mon Jun 13 18:13:36 CEST 2005
Again, I would like to thank Gabor Grothendieck for your help.
I can improve which you suggest with the others combination.
And thank you for your time.
On this day 6/13/2005 2:38 PM, Gabor Grothendieck wrote:
> The pattern seems to be that each row contains at most one column
> that is not at level 1. That is the entry at row i and column col[i] has
> level lev[i] and all other entries are at level 1.
> col <- c(1,1,1,1,2,3,3,4)
> lev <- c(1:4,2,2,3,2)
> mat <- matrix(1, length(col), 4)
> mat[cbind(seq(col),col)] <- lev
> data.frame(interface = factor(mat[,1], lab = interface),
> screen = factor(mat[,2], lab = screen),
> computer = factor(mat[,3], lab = computer),
> available = factor(mat[,4], lab = available))
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help