search for: matrixobj

Displaying 3 results from an estimated 3 matches for "matrixobj".

2004 Jul 30
0
Re: matrix subsetting (was: [R] as(obj,
Suggest you try R 1.9.1 patched. This is what I get on Windows XP with that: > matrixObj <- array(1:4, c(2,2)) > class(matrixObj) <- "matrix" > fooObj <- matrixObj > class(fooObj) <- "foo" > fooObj[1:2] [1] 1 2 > matrixObj[1:2] [1] 1 2 > getAnywhere("[.matrix") no object named '[.matrix' was found > getAnywhere(&quo...
2004 Jul 28
3
as(obj,"matrix")
Hi! Here a simple example. setClass("myclass" ,representation(info="character") ,contains="matrix" ) rownames(dd)<-c("a","b") tt<-new("myclass",dd) #the source of pain. as(tt,"matrix")<-matrix(1,3,3) Error: length of dimnames [1] not equal to array extent Is there a different way to do what I would like to do (I
2004 Jul 28
3
as(obj,"matrix")
Hi! Here a simple example. setClass("myclass" ,representation(info="character") ,contains="matrix" ) rownames(dd)<-c("a","b") tt<-new("myclass",dd) #the source of pain. as(tt,"matrix")<-matrix(1,3,3) Error: length of dimnames [1] not equal to array extent Is there a different way to do what I would like to do (I