[R] ifelse logic and multiple assignments

2010-03-10 Thread David Young
I'm a fairly new R user and while I have a solution to my problem I'm wondering if there is a better one. In SAS it's common to use if/then logic along with a do statement to make several things happen. While I could do the same thing in R using a for loop, and if and {}, I've read that loops

Re: [R] ifelse logic and multiple assignments

2010-03-10 Thread David Winsemius
On Mar 10, 2010, at 11:47 AM, David Young wrote: I'm a fairly new R user and while I have a solution to my problem I'm wondering if there is a better one. In SAS it's common to use if/then logic along with a do statement to make several things happen. While I could do the same thing in R

Re: [R] ifelse logic and multiple assignments

2010-03-10 Thread Bert Gunter
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Young Sent: Wednesday, March 10, 2010 8:47 AM To: r-help@r-project.org Subject: [R] ifelse logic and multiple assignments I'm a fairly new R user and while I have a solution to my problem I'm

[R] ifelse logic and multiple assignments

2010-03-10 Thread David Young
I'm a fairly new R user and while I have a solution to my problem I'm wondering if there is a better one. In SAS it's common to use if/then logic along with a do statement to make several things happen. While I could do the same thing in R using a for loop, and if and {}, I've read that loops