Hi Walter, I can't reproduce your results. Please provide some data that demonstrates the problem.
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example subset() and [ differ in their handling of NA values, and you don't need the dd$ in the arguments to subset(). But those don't explain your result given the information provided. Please provide more information. Sarah On Mon, Jan 6, 2014 at 12:06 PM, Walter Anderson <wandrso...@gmail.com> wrote: > I have a data frame that I am extracting some records from and noticed the > following issue > > I originally used tmp <- subset(dd, dd$EVYEAR==2012 & dd$EVMONTH=='02') > > and noticed that I wasn't ending up with all of the records I should have; > however, when I used > > tmp <- dd[dd$EVYEAR==2012 & dd$EVMONTH=='02',] > > I did get all of the records I should have. > > I thought the two forms were equivalent, am I mistaken? > -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.