[R] prblem with NA

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Tue Jan 6 10:12:49 CET 2009


Prof Brian Ripley wrote:
> On Tue, 6 Jan 2009, Petr PIKAL wrote:
>
> [...]
>
>> Logical vectors can be treated like numeric with TRUE=1 and FALSE=0,
>
> More accurately, 'like integer' ('numeric' often means 'double').
>

why would this be more accurate?

is(TRUE+0)
# numeric, not integer

is.integer(TRUE+0)
# FALSE

vQ




More information about the R-help mailing list