search for: fooobject

Displaying 6 results from an estimated 6 matches for "fooobject".

Did you mean: foo_object
2010 Jun 09
0
Argument mismatches in S3 generic and method
...gument than the generic depends on whether there is a ... in the argument list. If there is is no ellipsis then the call cannot tag the argument with either name but an untagged first argument works: > zNoDots <- function(x) UseMethod("zNoDots") > zNoDots.foo <- function(fooObject) { cat("zNoDots.foo: fooObject=") ; dput(fooObject) } > foo <- structure(1:4, class="foo") > x <- "x in .GlobalEnv" > zNoDots(foo) zNoDots.foo: fooObject=structure(1:4, class = "foo") > zNoDots(x=foo) zNoDots.foo: fooObject=Error...
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
2010 May 14
2
Subscripting a matrix-like object
I have an S3 class called "tis" (Time Indexed Series) which may or may not have multiple columns. I have a function "[<-.tis" that I've reproduced below. My question is this: inside of "[<-.tis", how can I distinguish between calls of the form x[i] <- someValue and x[i,] <- someValue ? In either case, nargs() is 3, and looking at the values
2010 May 14
2
Subscripting a matrix-like object
I have an S3 class called "tis" (Time Indexed Series) which may or may not have multiple columns. I have a function "[<-.tis" that I've reproduced below. My question is this: inside of "[<-.tis", how can I distinguish between calls of the form x[i] <- someValue and x[i,] <- someValue ? In either case, nargs() is 3, and looking at the values
2007 Mar 15
4
R 2.5.0 devel try issue in conjuntion with S4 method dispatch
...representation("fooBase"), validity = NULL, where = .GlobalEnv, sealed = TRUE) plotObject.foo <- function(x, y) { plot(x,y) } setMethod("plotObject", signature=c("foo", "numeric"), plotObject.foo, where=.GlobalEnv) fooObject <- new("foo") ## should fail and return object with attribute 'try-error' set ret <- try(plotObject(fooObject, character(1))) Error in as.list(call)[[1]] == "doTryCatch" : comparison (1) is possible only for atomic and list types >is(ret) Error in .cl...
2005 May 10
1
Fwd: Re: Implementation of the names attribute of attribute lists
Hi Martin, Thanks for your reply. I am responding on r-devel to provide some examples of outputs of the function that I had list in the post-scriptum of my previous email (BTW, did my post went through the list? I subscribed only after mailing it). You wrote: >Just to ask the obvious: > > Why is using str() not sufficient for you and instead, > you use 'print.object'