search for: fooobjs

Displaying 4 results from an estimated 4 matches for "fooobjs".

Did you mean: fooobj
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 >
2013 Jan 28
1
parse/eval and character encoded expressions: How to deal with non-encoding strings?
Hi, I am intending to save a path-describing character object in a slot of a class I'm working on. In order to have the option to use "system.file" etc in such string-saved path definitions, I wrote this ExpressionEvaluator <- function(x){ x <- tryCatch( expr=base::parse(text=x), error = function(e){return(as.expression(x))}, finally=TRUE) return(x) } This
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