Re: [R] subsetting of factor

2008-09-12 Thread Hui-Yi Chu
Hi Adai, It works!! Thanks a lot!! Hui-Yi On Fri, Sep 12, 2008 at 11:26 AM, Adaikalavan Ramasamy < [EMAIL PROTECTED]> wrote: > help(rowttests) says that fac needs to be a factor. So how about ? > > m <- matrix( rnorm(30), nc=6 ) > genotype <- c("a", "a", "b", "b", "c", "c") > > w1 <- which(

Re: [R] subsetting of factor

2008-09-12 Thread Adaikalavan Ramasamy
help(rowttests) says that fac needs to be a factor. So how about ? m <- matrix( rnorm(30), nc=6 ) genotype <- c("a", "a", "b", "b", "c", "c") w1 <- which( genotype %in% c("a", "b") ) w2 <- which( genotype %in% c("a", "c") ) w3 <- which( genotype %in% c("b", "c") ) list( ab = rowttes