Skip to content
Prev 385774 / 398503 Next

help with nesting if else statements

Hi Ana,

The ifelse function works like this:

*ifelse(condition, if.true, if.false)*

it will check the condition, and if, and only if, condition is true, it
will execute whatever is in if.true,

and if condition is false (and only if the condition is false) it will
execute what's in if.false.

when nesting it, you should establish an order of priorities of your rules,
and put the one with most priority first.

In your case, it seems that the rule

*PLASER==2 -> PHENO==2*

has greater priority over

*CURRELIG==1 -> PHENO==1*

so the order should be the opposite.
On Wed, Sep 23, 2020, 13:44 Ana Marija <sokovic.anamarija at gmail.com> wrote: