Re: [Rd] Warning when indexing data.frame with FALSE

From: hadley wickham <h.wickham_at_gmail.com>
Date: Mon 31 Jul 2006 - 11:42:23 GMT

Sorry, a better example is:

> data.frame(a=1)[FALSE]
NULL data frame with 1 rows
> data.frame(a=1)[NULL]
NULL data frame with 1 rows

vs

> data.frame()[FALSE]
Warning in is.na(nm) : is.na() applied to non-(list or vector) NULL data frame with 0 rows
> data.frame()[NULL]

Warning in is.na(nm) : is.na() applied to non-(list or vector) NULL data frame with 0 rows

Hadley



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon Jul 31 21:48:40 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 31 Jul 2006 - 12:27:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.