search for: ifelsejh

Displaying 2 results from an estimated 2 matches for "ifelsejh".

Did you mean: ifelse
2016 Nov 26
3
ifelse() woes ... can we agree on a ifelse2() ?
...t, lt-100) is an example of mixed class. * The part of function 'chkIfelse' in for(i in seq_len(nFact)) uses 'NA.' function argument. That makes error when 'chkIfelse' is applied to function without fourth argument. The part should be wrapped in if(has.4th) . * Function 'ifelseJH' has fourth argument, but the argument is not for value if NA. So, instead of chkIfelse(ifelseJH) , maybe call chkIfelse(function(test, yes, no) ifelseJH(test, yes, no)) . A concrete version of 'ifelse2' that starts the result from 'yes': function(test, yes, no, NA. = NA) { ? ?...
2016 Nov 28
0
ifelse() woes ... can we agree on a ifelse2() ?
...ion 'chkIfelse' in > for(i in seq_len(nFact)) > uses 'NA.' function argument. That makes error when 'chkIfelse' is applied to function without fourth argument. > The part should be wrapped in > if(has.4th) . yes of course > * Function 'ifelseJH' has fourth argument, but the argument is not for value if NA. So, instead of > chkIfelse(ifelseJH) , > maybe call > chkIfelse(function(test, yes, no) ifelseJH(test, yes, no)) . You are right; I've decided to solve this differently. I'm looking at these suggestions...