similar to: setGeneric / standardGeneric when args are not "literals" - corrected

Displaying 20 results from an estimated 2000 matches similar to: "setGeneric / standardGeneric when args are not "literals" - corrected"

2003 Sep 27
2
does isGeneric work differently in 1.8.0 ?
Hello, the last command (isGeneric) in following R-code (attached) produces different output, depending on wheter 1.8.0 alpha or 1.7.1 is used. Is that to be expected ? Both R Versions were started with option vanilla --------------------------------------------------- R.1.7.1: --------------------------------------------------- > version _ platform i686-pc-linux-gnu arch i686
2010 Aug 25
1
Documenting S4 Methods
I'm in the process of converting some S3 methods to S4 methods. I have this function : setGeneric("enrichmentCalc", function(rs, organism, seqLen, ...){standardGeneric("enrichmentCalc")}) setMethod("enrichmentCalc", c("GenomeDataList", "BSgenome"), function(rs, organism, seqLen, ...) { ... ... ... })
2007 Jan 31
2
Problems with definitions of S4-generics
Hello all, I'd like to report a problem related to S4 classes. Platform: Mac G4/400 PCI (PPC-architecture) Mac OS 10.4.8 R 2.4.1 for Mac OS X (CRAN binary, 2006-12-19) w/ R.app 1.18 Last December, Simon Urbanek confirmed that the issue is not platform related, and that it is most likely a bug. He suggested to post my report to "the appropriate mailing list" -- I choose r-devel.
2005 Nov 14
1
Tidiest way of modifying S4 classes?
I wish to make modifications to the plot.pedigree function in the kinship package. My attempts to contact the maintainer have been unsuccessful, but my question is general, so specifics of the kinship package might not be an issue. My first attempt was to make a new function Plot.pedigree in the .GlobalEnv which mostly achieved what I wanted to. However, I'm sure that's not the tidiest
2009 Feb 25
1
Unexpected side effect of the ":::" operator on the value of isGeneric
Hi, when running the following on a fresh R, library("IRanges") annotation showMethods("annotation") Biobase:::annotation showMethods("annotation") I get (see the "^^^^^" marked output at the bottom): > library("IRanges") Carico il pacchetto richiesto: 'IRanges' The following object(s) are masked from package:base :
2006 Feb 14
3
S4 classes and methods with optional arguments
Hi, i have used S4 classes to implement a unified access to random number generators (package rstream on CRAN). I have used a construct to allow optional arguments: if(!isGeneric("rstream.sample")) setGeneric("rstream.sample", function(stream,...) standardGeneric("rstream.sample")) setMethod("rstream.sample",
2005 Jun 17
1
(PR#7951) DispatchOrEval missing in do_isfinite and do_isinfinite
Hi, OK, if you try to explicitly make them generic, you are told that they are implicitly already generic: > setGeneric("is.finite", function(from, ...) standardGeneric("is.finite")) Error in setGeneric("is.finite", function(from, ...) standardGeneric("is.finite")) : "is.finite" is a primitive function; methods can be defined, but the
2009 Nov 10
1
standardGeneric seems slow; any way to get around it?
Hi, I'm running some routines with standard matrix operations like solve() and diag(). When I do a profile, the lead item under total time is standardGeneric(). Furthermore, solve() and diag() have much greater total time than self time. ??? I assume there is some time-consuming decision going on in the usual functions; is there any way to avoid that and go straight to the calculaions? Thanks
2007 Aug 07
1
S4 methods: unable to find an inherited method
Hello all, I consider myself pretty new to the whole OO based programming so I'm sorry if I'm doing something stupid. > xml<-read.metlin(url) Error in function (classes, fdef, mtable) : unable to find an inherited method for function "read.metlin", for signature "url" >read.metlin standardGeneric for "read.metlin" defined from package
2004 Dec 03
2
setGeneric(rm)
Hi, We are developing a package using S4 classes. The S4 classes are wrappers to C++ classes. So S4 classes contain an integer that is the memory address of one C++ object. If an user calls the rm() function, the C++ object must be deleted. But our generic rm() function apparently doesn't work. Here is the code: # The class setClass("component",
2012 Apr 12
1
R-2.15.0 and Exporting Methods Converted To S4 Generic
Late to the show on this release, unfortunately. One of our production packages no longer builds under R-2.15.0 with the following message. ** testing if installed package can be loaded Error: Function found when exporting methods from the namespace 'SuperCurve' which is not S4 generic: 'image' Possibly relevant clues follow: ## From R/AllGenerics.R if
2003 May 27
1
setGeneric?
In the last few days I've received couple of messages pointing out that our SparseM package fails to install on the patched version of 1.7.0. Laurent Gaultier kindly suggested that replacing: setGeneric("as.matrix.csr") by setGeneric("as.matrix.csr", function(x, nrow, ncol, eps) standardGeneric("as.matrix.csr")) was sufficient to fix the problem.
2002 Jul 01
1
SetGeneric and formula interfaces
Hi, while playing with the `methods' package I was not able to find what the recommended way of dealing with the following problem is. Suppose there is a generic function `foo' and two functions `foo.default' and `foo.formula', in the classical way: foo <- function(y, ...) UseMethod("foo") foo.default <- function(y, ...) {} foo.formula <- function(formula,
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
Interrogating some (of my own) code in another package. >norm.meth <- getMethod("normalize", "MatrixLike") >message("str(norm.meth)") >str(norm.meth) >message("show(norm.meth at .Data)") >show(norm.meth at .Data) Last show() displays this: function (object, ...) { .local <- function (object, method = c("median",
2006 Dec 28
1
setGeneric and file order in a package
Are there any assumptions I can make about the order in which different files in the R package subdirectory will be evaluated? For example, will it be alphabetical in the file names? Will case distinctions be ignored? I ask because I would like to use setGeneric, as in setGeneric("foo", function(x) standardGeneric("foo")) and am wondering where that should go. I realize I
2009 Jul 07
0
Protection stack overflow when calling setGeneric()/setMethod() from within .onLoad()
Hi list, Calling setGeneric()/setMethod() from within the .onLoad() hook of MyPkg package produces the following error: > gctorture(TRUE) > library(MyPkg) .onLoad(): ok1 .onLoad(): ok2 Error : protect(): protection stack overflow Error : .onLoad failed in 'loadNamespace' for 'MyPkg' Error: package/namespace load failed for 'MyPkg' This is with
2010 Sep 07
2
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
I have created the function prototype with the following code: const uintmax_t methodNameSize = 1024; const char methodNameTemplate[] = "llvm.memcpy.p0i%llu.p0i%llu.i%llu"; char methodName[methodNameSize]; // Create the methodName. memset(methodName, 0, methodNameSize); sprintf(methodName, methodNameTemplate, dstSize, srcSize, lengthSize); // Search for the
2007 Apr 15
1
unable to find inherited method for function "edges", for signature "ugsh", "missing"
I am new to using S4 methods and have run into this problem (on Windows XP using R 2.4.1): I am writing a package in which I use the graph package. I define my own classes of graphs as: setOldClass("graphsh") setOldClass("ugsh") setIs("ugsh", "graphsh") (I know that I "should have" used setClass instead - and I will eventually - but right now
2006 May 22
2
confused by inheritance...
Hi r-devels, I am stuck in some S4 inheritance problem: setClass("A",representation(a="numeric")) setClass("A1",representation(b="numeric"),contains="A") setClass("A2",representation(c="numeric"),contains="A1") if(!isGeneric("foo")){ setGeneric("foo", function(x,y,z, ...)
2006 Jan 04
5
Webservice External XMLRPC
Hello i have some trouble getting my webservice to run . I have the following webservice : class DirectSpoolAPI < ActionWebService::API::Base api_method :add, :expects => [{:html=>:string},{:from=>:string}], :returns => [Customer] end class DirectSpoolService < ActionWebService::Base web_service_api DirectSpoolAPI def add(html,from) Customer.find(:first) end