Re: [R] If Then Trouble

2011-04-24 Thread Uwe Ligges
On 24.04.2011 22:10, Sparks, John James wrote: Dear R Helpers, I have another one of those problems involving a very simple step, but due to my inexperience I can't find a way to solve it. I had a look at a number of on-line references, but they don't speak to this problem. I have a variable

Re: [R] If Then Trouble

2011-04-24 Thread Joshua Wiley
Hi John, On Sun, Apr 24, 2011 at 1:10 PM, Sparks, John James wrote: > Dear R Helpers, > > I have another one of those problems involving a very simple step, but due > to my inexperience I can't find a way to solve it.  I had a look at a > number of on-line references, but they don't speak to this

Re: [R] If Then Trouble

2011-04-24 Thread jim holtman
?ifelsethis is vectorized 'if' only handles single values testY2$redgroups <- ifelse(testY2$redgroups > 17, 17, testY2$redgroups) On Sun, Apr 24, 2011 at 4:10 PM, Sparks, John James wrote: > Dear R Helpers, > > I have another one of those problems involving a very simple step, but due > to

[R] If Then Trouble

2011-04-24 Thread Sparks, John James
Dear R Helpers, I have another one of those problems involving a very simple step, but due to my inexperience I can't find a way to solve it. I had a look at a number of on-line references, but they don't speak to this problem. I have a variable with 20 values > table (testY2$redgroups) 1