Skip to content
Prev 311395 / 398513 Next

Using if

Hi,

Thanks for providing a reproducible example.

On Tue, Nov 20, 2012 at 2:08 PM, Virgile Capo-Chichi
<vcapochichi at gmail.com> wrote:
In this case,

RiskTest <- EvHint * MinTex

In the more general case,
RiskTest <- ifelse(EvHint == 1 & MinTex == 1, 1, 0)

Note that the test for equality is == and not =

You should probably read the Intro to R that came with your
installation and is available online.

--
Sarah Goslee
http://www.functionaldiversity.org