[Rd] what should NCOL(NULL) return?

Hiroyuki Kawakatsu hkawakat at gmail.com
Thu Oct 29 11:39:39 CET 2009


Hi,

I get (using r50188)

> nrow(NULL)
NULL
> NROW(NULL)
[1] 0
> ncol(NULL)
NULL
> NCOL(NULL)
[1] 1

The last seems 'wrong' to me, though matrix(NA, 0, 1) appears to be
well defined.

> blackhole = matrix(NA, 0, 1)
> blackhole[,1] = 5
> blackhole
     [,1]

h.
-- 
+---
| Hiroyuki Kawakatsu
| Business School, Dublin City University
| Dublin 9, Ireland. Tel +353 (0)1 700 7496



More information about the R-devel mailing list