[R] value transformations in a vector

2008-05-15 Thread Juan Pablo Fededa
Dear contributors: I have vector A composed of numbers wich have values equal to 1 and different to 1. I want to transform de components with a value=1 to a component of value=0, and those with a value different to1, to a value=1. Then I want to take out the components=0. Thanks in advance,

Re: [R] value transformations in a vector

2008-05-15 Thread Peter Alspach
Juan Pablo Look at the results of: as.numeric(A!=1) and A[A!=1] HTH ... Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Juan Pablo Fededa Sent: Friday, 16 May 2008 1:36 a.m. To: r-help Subject: [R] value transformations