Re: [R] applying a set of rules to each row

2011-01-27 Thread David Winsemius
time. Adrian -Original Message- From: Dennis Murphy [mailto:djmu...@gmail.com] Sent: Wednesday, January 26, 2011 4:57 PM To: KATSCHKE, ADRIAN CIV DFAS Subject: Re: [R] applying a set of rules to each row Hi: I don't see the need for this labyrinth of if statements. Here's a w

Re: [R] applying a set of rules to each row

2011-01-27 Thread KATSCHKE, ADRIAN CIV DFAS
:djmu...@gmail.com] Sent: Wednesday, January 26, 2011 4:57 PM To: KATSCHKE, ADRIAN CIV DFAS Subject: Re: [R] applying a set of rules to each row Hi: I don't see the need for this labyrinth of if statements. Here's a way that I think solves the CSRS block with only one ifelse statement:

Re: [R] applying a set of rules to each row

2011-01-26 Thread Bert Gunter
... or perhaps just break things up with assignments and do it in stages. -- Bert On Wed, Jan 26, 2011 at 12:52 PM, David Winsemius wrote: > I remember something about the degree of nesting of ifelse calls being > limited to 7 deep (???)  that makes me worry about this approach. You may > want t

Re: [R] applying a set of rules to each row

2011-01-26 Thread David Winsemius
I remember something about the degree of nesting of ifelse calls being limited to 7 deep (???) that makes me worry about this approach. You may want to look at the arules package or the data.table package or the sqldf package for approaches that are specifically constructed with this sort

Re: [R] applying a set of rules to each row

2011-01-26 Thread KATSCHKE, ADRIAN CIV DFAS
Yes. That is exactly what I would like to have running. Here is the first attempt I made at using a nested ?ifelse statement for one of the retirement plans. The variables are all there but with different names. ageYOSstart is ageFedStart, SCDCivLeave is srvCompDT. I haven't gotten this working.

Re: [R] applying a set of rules to each row

2011-01-26 Thread Bert Gunter
If I understand you correctly, you want ?ifelse, which works on the full logical vectors of rules applied to the variables, not ifelse, which works on only a single logical. -- Bert Gunter On Wed, Jan 26, 2011 at 12:18 PM, KATSCHKE, ADRIAN CIV DFAS wrote: > All, > > I would like to apply a s

[R] applying a set of rules to each row

2011-01-26 Thread KATSCHKE, ADRIAN CIV DFAS
All, I would like to apply a set of rules to each row of the sample data set below. The rule sets are the guidelines for determining an individual's date for retirement eligibility. The rules are found in this document, http://www.opm.gov/feddata/RetirementPaperFinal_v4.pdf. I am only interested i