Re: [R] Question about range of letters

2014-10-04 Thread Robert Baer
On 10/4/2014 8:21 AM, Nia Gupta wrote: Hello, I have a column with a bunch of letters. I would like to keep some of these letters (A,C,D,L) and turn the rest into 'X'. I have tried using ifelse with '|' in between the argument but it didn't work nor did 4 separate ifelse statements. Example

Re: [R] Question about range of letters

2014-10-04 Thread Ben Bolker
Nia Gupta yahoo.com> writes: > > Hello, > I have a column with a bunch of letters. I would like to keep some > of these letters (A,C,D,L) and turn the rest into 'X'. > I have tried using ifelse with '|' in between the argument but it > didn't work nor did 4 separate ifelse statements. > E

[R] Question about range of letters

2014-10-04 Thread Nia Gupta
Hello, I have a column with a bunch of letters. I would like to keep some of these letters (A,C,D,L) and turn the rest into 'X'. I have tried using ifelse with '|' in between the argument but it didn't work nor did 4 separate ifelse statements. Example, I currently have: Letters    A    B