From h.wickham at gmail.com  Mon Jul 31 13:41:12 2006
From: h.wickham at gmail.com (hadley wickham)
Date: Mon, 31 Jul 2006 12:41:12 +0100
Subject: [Rd] Warning when indexing data.frame with FALSE
Message-ID: <f8e6ff050607310441v1cd40ae0n6fb479cbd5a763a0@mail.gmail.com>

> 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



[Rd] Warning when indexing data.frame with FALSE
hadley wickham