[R] as.integer(TRUE)

Tamas K Papp tpapp at Princeton.EDU
Tue Sep 14 03:17:50 CEST 2004

The fact that as.integer(TRUE) is 1 (and that for FALSE, it gives
zero) is a really nice feature, eg when constructing piecewise
functions (for example, as in -x*(x<0)+x*(x>=0)) and for many other

Since I haven't found a reference about this, I just wanted to ask
whether this is officialy part of the language or just a side effect
(ie I want to know whether it is here to stay and if it is prudent to
use this).



More information about the R-help mailing list