Re: [R] subset without removing NAs

From: Jannis <>
Date: Thu, 28 Apr 2011 22:21:12 +0200

On 04/28/2011 09:53 PM, Benjamin Caldwell wrote:
> rws50<- subset(,shigo.av<50)

quick and dirty would be to replace all NAs with -99999 (or similar), use subset, and set all values ==-99999 in the subset back to NA. There may be more elegant solutions, though.

Jannis mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 28 Apr 2011 - 20:24: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 28 Apr 2011 - 20:50:34 GMT.

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

list of date sections of archive