Re: [R] switch() usage

2008-08-26 Thread Michael A. Gilchrist
ECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael A. Gilchrist Sent: Tuesday, August 26, 2008 6:03 PM To: r-help@r-project.org Subject: [R] switch() usage Hello, I am wondering if it is possible to run separate lines of code within switch() as one can do in most languages. For example, I'd

Re: [R] switch() usage

2008-08-26 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Michael A. > Gilchrist > Sent: Tuesday, August 26, 2008 6:03 PM > To: r-help@r-project.org > Subject: [R] switch() usage > > Hello, > > I am wondering if it is

[R] switch() usage

2008-08-26 Thread Michael A. Gilchrist
Hello, I am wondering if it is possible to run separate lines of code within switch() as one can do in most languages. For example, I'd like to have switch execute a few lines of code based on the value passed to it. For example, index = 1 switch(index, command 1; command 2; comm