You can. Perhaps needless to say, be careful with this. ❯ `if` <- function(...) FALSE ❯ if (TRUE) TRUE else FALSE [1] FALSE
G. On Sat, Mar 4, 2017 at 5:36 PM, Da Zheng <zhengda1...@gmail.com> wrote: > Hello, > > I heard we can override almost everything in R. Is it possible to > override "if" keyword in R to evaluate my own object instead of a > logical value? > > Thanks, > Da > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel