Re: [R] NAs - NAs are not allowed in subscripted assignments

From: Gabor Csardi <>
Date: Thu, 24 Jul 2008 14:01:04 -0500

On Thu, Jul 24, 2008 at 10:39:34AM -0700, Nordlund, Dan (DSHS/RDA) wrote: [...]
> Yes, it does help. I was misunderstanding how logical values are
> used for indexing. I assumed incorrectly that a value would be
> returned only if the index expression evaluated as TRUE. It would
> seem that the philosophy is that not returning a value would imply
> that the expression evaluated to FALSE. So, indexing with NA must
> return something, and NA is the appropriate value to return since one
> doesn't know what it is.
> Is that a reasonable summary?

Yes, I think so. (But I have to say that I'm not completely aware of the ideology behind this choice.)


> Dan
> Daniel J. Nordlund
> Washington State Department of Social and Health Services
> Planning, Performance, and Accountability
> Research and Data Analysis Division
> Olympia, WA 98504-5204

Csardi Gabor <>    UNIL DGM

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 24 Jul 2008 - 19:09:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jul 2008 - 19:32:25 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive