[Rd] ambiguity in the documented return value of Null() from package MASS

Georgi Boshnakov georgi.boshnakov at manchester.ac.uk
Mon Nov 10 13:49:38 CET 2014


Hi,
 
Function Null from package MASS seems to return a matrix with zero columns and the expected number of rows when
the null space of the argument contains only the zero vector, e.g. 

> library(MASS)
> diag(nrow=3)
     [,1] [,2] [,3]
[1,]    1    0    0
[2,]    0    1    0
[3,]    0    0    1

>  Null(diag(nrow=3))

[1,]
[2,]
[3,]

But the documentation of Null  seems to imply that the result is numeric(0):

-----------------------------------------------

Value: 

The matrix 'N' with the basis for the null space, or an empty
     vector if the matrix 'M' is square and of maximal rank.

-----------------------------------------------

(R version 3.1.1 Patched (2014-09-21 r66653) -- "Sock it to Me")

Georgi



More information about the R-devel mailing list