[R] Possible bug in is.na.data.frame(): input without columns

Mikko Korpela mikko.korpela at aalto.fi
Mon Jun 25 15:23:10 CEST 2012


On 06/20/2012 05:36 PM, Mikko Korpela wrote:
> Hello list!
> 
> Let's construct a matrix / data.frame with 0 columns, but > 0 rows, and
> non-NULL rownames. Then, call is.na() on both the data.frame and the
> matrix. We find that is.na.data.frame() gives an error. When row.names
> are removed, is.na.data.frame() returns NULL. I think that the NULL
> result is also wrong. From ?is.na:
> 
>      The method ‘is.na.data.frame’ returns a logical matrix with the
>      same dimensions as the data frame, and with dimnames taken from
>      the row and column names of the data frame.
> 
> No problems are seen when is.na() is run on the matrix. What do you
> think, should a formal bug report be filed?

Bug report filed to R bugzilla.

-- 
Mikko Korpela
Aalto University School of Science
Department of Information and Computer Science



More information about the R-help mailing list