Skip to content
Prev 361405 / 398506 Next

Making an if condition variable ?

"ce" <zadig_1 at excite.com> writes:
In this case - why not use a function instead of the condition?

cond <- function(x){x>0}
and than

if (cond(4)) {...}

might be the easiest in this case?

or, more flexible,

cond <- function(...){x>0}

if (cond(x=3)) {...}

Cheers,

Rainer