[R] Adding logical vectors

2009-08-13 Thread David Huffer
When adding several logical vectors I expect each vector will be coerced to integers and these vectors will then be added. That doesn't always seem to be the case. For example: ( f1 - as.factor ( sample ( x , 25 , rep = T ) ) ) [1] x x x x x x x x x x x x x x x x x x x x x x x x x

Re: [R] Adding logical vectors

2009-08-13 Thread Ted Harding
On 13-Aug-09 19:21:36, David Huffer wrote: When adding several logical vectors I expect each vector will be coerced to integers and these vectors will then be added. That doesn't always seem to be the case. For example: ( f1 - as.factor ( sample ( x , 25 , rep = T ) ) ) [1] x x x