Skip to content
Prev 139568 / 398506 Next

empty array

John Kane a ?crit :
Well, in your code, 'mymatrix' is not a matrix :

a<-array(dim=c(0,0))  # Solution of Gabor Csardi
<0 x 0 matrix>
class(a)
[1] "matrix"
b<-NULL
class(b)
[1] "NULL"

Your definition will probably works in most case, but in S4, the uses of 
type is an important point, so I need to use matrix where I shall use 
matrix, even if it is an empty one.

Christophe