Re: [R] evaluate a set of symbols within an IF statement

2009-09-26 Thread Jorge Ivan Velez
Hi zubin, Try also tname = "VIX" checkticker = c("VIX", "TYX", "TNX", "IRX") is.element(tname, checkticker) # [1] TRUE HTH, Jorge On Fri, Sep 25, 2009 at 8:00 PM, zubin wrote: > Hello, writing some R code to cleanse a data set, if the following set of > symbols are identified then perform som

Re: [R] evaluate a set of symbols within an IF statement

2009-09-26 Thread Greg Snow
0 PM > To: r-help@r-project.org > Subject: [R] evaluate a set of symbols within an IF statement > > Hello, writing some R code to cleanse a data set, if the following set > of symbols are identified then perform some actions. trying to write > the minimum code to do this. >

Re: [R] evaluate a set of symbols within an IF statement

2009-09-25 Thread cls59
zubin-2 wrote: > > > how do i evaluate this whole list to a single boolean True or False? If > any of these are true the whole statement is True, else False. this > only seems to work for the first ticker, the rest don't perform the > operations within the loop. > > Try %in% tname %in

[R] evaluate a set of symbols within an IF statement

2009-09-25 Thread zubin
Hello, writing some R code to cleanse a data set, if the following set of symbols are identified then perform some actions. trying to write the minimum code to do this. tname = "VIX" checkticker = c("VIX", "TYX", "TNX", "IRX") if (tname == checkticker) { //perform some operations