powered by
This function is a port of ifelse from base. Usually the behaviour should be identical.
ifelseC(test, yes, no)
logical vector or an object that can be compressed to a logical vector
numerical, character, integer or logical vector for cases where test is TRUE.
numerical, character, integer or logical vector for cases where test is FALSE.
The parameters must have the same length, or, in the case of yes or no, length must be 1.
# NOT RUN { test = c(TRUE,FALSE,NA); yes = c(1,1,1); no = c(2,2,2) all(ifelseC(test, yes, no) == ifelse(test, yes, no)) # }
Run the code above in your browser using DataLab