[Rd] Warning when indexing data.frame with FALSE

hadley wickham h.wickham at gmail.com
Mon Jul 31 13:41:12 CEST 2006


> data.frame()[]
NULL data frame with 0 rows
> 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

Is this a bug?  I wouldn't have expected the warning in the last two cases.

Regards,

Hadley



More information about the R-devel mailing list