OK, this should be trivial but I'm not finding it. I want to compress
the test,
if (i==7 | i==10 | i==30 | i==50) {}
into something like
if (i in c(7,10,30,50)) {}
so I can build a excludes vector
excludes - c(7,10,30,50)
and test
if (i in excludes) {}
However, I'm not finding a clue on
Take a look at ?any.
On Thu, Dec 11, 2008 at 3:11 PM, David B. Thompson, Ph.D., P.E.,
D.WRE, CFM [EMAIL PROTECTED] wrote:
OK, this should be trivial but I'm not finding it. I want to compress the
test,
if (i==7 | i==10 | i==30 | i==50) {}
into something like
if (i in c(7,10,30,50)) {}
OK, this should be trivial but I'm not finding it. I want to compress
the test,
if (i==7 | i==10 | i==30 | i==50) {}
into something like
if (i in c(7,10,30,50)) {}
so I can build a excludes vector
excludes - c(7,10,30,50)
and test
if (i in excludes) {}
Works for me.
i %in% c(7,10,30,50)
On Thu, Dec 11, 2008 at 12:11 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM
drdbthomp...@gmail.com wrote:
OK, this should be trivial but I'm not finding it. I want to compress the
test,
if (i==7 | i==10 | i==30 | i==50) {}
into something like
if (i in c(7,10,30,50))
4 matches
Mail list logo