Re: [R] Multiple logical operations in a subscript

2008-09-19 Thread Ted Harding
On 19-Sep-08 16:03:45, Greg Snow wrote: > Peter showed you the %in% operator, you may also want to look at the > subset, transform, with, and within functions for future use as ways to > reduce the need to type the name of an object multiple times. > > Hope this helps, Let me add my perhaps very

Re: [R] Multiple logical operations in a subscript

2008-09-19 Thread Greg Snow
Peter showed you the %in% operator, you may also want to look at the subset, transform, with, and within functions for future use as ways to reduce the need to type the name of an object multiple times. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healt

Re: [R] Multiple logical operations in a subscript

2008-09-18 Thread Peter Alspach
Mark Try dataframe$newvariable[data$oldvariable %in% c("X","Y","Z")] <- "group1" HTH ... Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mark Na > Sent: Friday, 19 September 2008 12:11 p.m. > To: [EMAIL PROTECTED] > Subject: [R] M