search for: coercefun

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

Did you mean: coercefunc
2015 May 28
3
S4 inheritance and old class
Hey everyone, I would like to develop a package using S4 classes. I have to define several S4 classes that inherits from each others as follow: # A <- B <- C <- D I also would like to define .DollarNames methods for these class so, if I have understood well, I also have to define an old class as follow: # AOld <- A <- B <- C <- D setOldClass(Classes = "AOld")
2008 Aug 27
1
S4 coercion
...collapse = "\n")), domain = NA, call. = FALSE) 10: .findInheritedMethods(signature, fdef, mtable = allmethods, table = mlist, useInherited = useInherited, verbose = verbose) 9: selectMethod("coerce", sig, optional = TRUE, c(from = TRUE, to = FALSE), fdef = coerceFun, mlist = coerceMethods) 8: as(obj, "integer") 7: isIdCurrent(con) 6: postgresqlQuickSQL(conn, statement, ...) 5: dbGetQuery(con, paste("SELECT tbl FROM Meta ", where, ";")) 4: dbGetQuery(con, paste("SELECT tbl FROM Meta ", where, ";")) 3: TSdbi:::...
2007 Apr 15
0
as() creates invalid entries in methods list?
...o method definition - asMethod <- .asCoerceMethod(asMethod, sig, FALSE) - } } } if(is.null(asMethod) && extends(Class, thisClass)) { @@ -54,6 +51,10 @@ as <- fdef = coerceFun, mlist = coerceMethods) inherited <- TRUE + } else { + if(canCache) { # make into method definition + asMethod <- .asCoerceMethod(asMethod, sig, FALSE) + } }...
2015 Dec 19
2
For integer vectors, `as(x, "numeric")` has no effect.
As I tried to say on Dec. 11, there are two levels of "fix": 1. The fix to the complaint in the OP's subject heading is to conform to the default third argument, strict=TRUE: as(1L, "numeric") == 1.0 This generates some incompatibilities, as for classes that extend "numeric". But still leaves class(1.0) "numeric" and typeof(1.0) "double".