On Tue, 4 Apr 2006, Antonio, Fabio Di Narzo wrote: > So in > NA+NA > the logical is automatically coerced to a numerical value, and > is.numericreturns TRUE, as expected. > > But for some reason, all arithmetic operations on NA's are >> in fact numeric, even if it's with other NA's. >>
All arithmetic operatiosn on *logicals* are coerced to numeric, so if you have two logical NAs and add them you get a numeric NA. This isn't anything special about NAs, since you would get the same conversion for TRUE+TRUE, and you would not get the same conversion for two character NAs -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel