search for: getgenerics

Displaying 20 results from an estimated 66 matches for "getgenerics".

Did you mean: getgeneric
2006 Sep 23
1
generics for primitive functions
i think these two code snippets exhibit a bug. they are identical but for the inclusion of an initial line in snippet [2] [1] setMethod("Math", signature(x = "numeric"), function(x) "Works") getGeneric("sqrt")(4) [2] getGeneric("sqrt")(4) setMethod("Math", signature(x = "numeric"), function(x) "Works")
2006 Sep 22
1
Possible bug in base::namespaceImportFrom?
Hi, namespaceImportFrom in base/R/namespace.R has the following: fdef <- methods:::getGeneric(genName, impenv) The definition of getGeneric is in methods/R/RMethodUtils.R starts with: getGeneric <- ## return the definition of the function named f as a generic. ## ## If there is no definition, throws an error or returns ## NULL according to the value of
2003 Oct 13
2
Infinite recursion in getGeneric (PR#4561)
> setClass('foo') [1] "foo" > setMethod('is.logical', 'foo', function(x) TRUE) [1] "is.logical" > getGeneric('is.integer') Error in options(x) : evaluation is nested too deeply: infinite recursion? > --please do not edit the information below-- Version: platform = i686-pc-linux-gnu arch = i686 os = linux-gnu system =
2004 Jun 26
1
S4 group "Math", "getGroupMembers", "genericForPrimitive"
...st cases." (see reply ## to mail: "Missing 'getGroupMembers()'" ## from Sat May 31 2003 - 15:18:18 EDT) ## Modification of this code ## since 'genericForPrimitive' is not defined (?) ## although it is called in 'getGeneric'!!! getGroups <- function(what = c(getGenerics(), names(.BasicFunsList))) { what <- what[what != "is.function"] what <- what[what != "is.null"] what <- what[what != "is.object"] g <-unlist(sapply(what, function(x){ f <- getGeneric(x) if(is(f,...
2014 Nov 25
0
problem with setGroupGeneric from package methods
...Class(cl, cldef, is(cldef, "ClassUnionRepresentation"), where) } else if(identical(cldef at package, pkg)) { .uncacheClass(cl, cldef) .removeSuperclassBackRefs(cl, cldef, searchWhere) } } } generics <- .getGenerics(where) packages <- attr(generics, "package") if(length(packages) < length(generics)) packages <- rep(packages, length.out = length(generics)) if(attach && exists(".requireCachedGenerics", where, inherits = FALSE)) { others <- get(...
2016 Mar 04
2
as.vector in R-devel loaded 3/3/2016
I see as below, where getGeneric and getMethod imply a different signature; the signature is mode="any" for both cases in R version 3.2.3 Patched (2016-01-28 r70038)I don't know how to reproduce Jeff's error, though. > library(Matrix) > as.vector function (x, mode = "any") .Internal(as.vector(x, mode)) <bytecode: 0xe79f88> <environment:
2005 Jan 13
3
as.character methods
Hello, ?as.character says that the as.character function is a generic with usage: as.character(x, ...). So, I want to create an S4 object with an as.character method following the above usage, but I get the below error telling me that ... isn't in the generic for as.character. > setClass("tmp", "numeric") > setMethod("as.character", "tmp",
2005 Jan 13
3
as.character methods
Hello, ?as.character says that the as.character function is a generic with usage: as.character(x, ...). So, I want to create an S4 object with an as.character method following the above usage, but I get the below error telling me that ... isn't in the generic for as.character. > setClass("tmp", "numeric") > setMethod("as.character", "tmp",
2003 Oct 15
2
help.search in trouble with R-patched ?
...mpt", agrep=F) Error: couldn't find function ".class1" > traceback() 12: initialize(value, ...) 11: initialize(value, ...) 10: new("ObjectsWithPackage", value, package = pkg) 9: metaNameUndo(unique(these), prefix = "M", searchForm = searchForm) 8: methods:::getGenerics(ns) 7: unique(c(methods:::getGenerics(ns), methods:::getGenerics(parent.env(ns)))) 6: loadNamespace(name) 5: getNamespace(ns) 4: asNamespace(ns) 3: getExportedValue(pkg, name) 2: tools::fileTest 1: help.search("prompt", agrep = F) > version _ platform i686-pc-linux-gnu arch...
2018 Jun 07
2
[lld] ObjFile::createRegular is oblivious of PendingComdat
I encountered a segfault when using lld to cross-compile for Windows (+MinGW) from Linux. The problem happens with objects built by gcc. The problem is that ObjFile::CreateRegular considers a PendingComdat to be valid (and later causes an illegal pointer dereference). The following patch fixes the crash: diff --git a/COFF/InputFiles.cpp b/COFF/InputFiles.cpp index 9e2345b0a..f47d612df 100644
2009 Dec 30
1
seg-fault... but on what
I got the following after running succesfully through this loop 28 million times... the loop opens text files in a directory and inserts line by line into a database... *** caught segfault *** address 0xc0000010, cause 'memory not mapped' Traceback: 1: .getGeneric(f, where, package) 2: getGeneric("coerce", where = where) 3: as(obj, "integer") 4:
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.
2018 Jun 07
2
[lld] ObjFile::createRegular is oblivious of PendingComdat
Can you upload a reproducer? You can create it using the /linkrepro flag. Peter On Thu, Jun 7, 2018 at 2:50 PM, Reid Kleckner via llvm-dev < llvm-dev at lists.llvm.org> wrote: > GCC does comdats completely differently from the spec. Since you contacted > me about this off of the mailing list, I started investigating what they > do, and it is completely different. It's
2001 Nov 13
0
Method dispatch in C for primitive functions
There is a version of the methods package committed today that does dispatch in C for these functions. This should considerably speed up programs that define methods for these functions (specifically, having methods should only marginally affect the existing computations for the same function on basic vectors and objects). This is the first of several steps needed. Not quite all primitives are
2006 May 02
0
methods for @ operator
i often find myself having a list of similarly-classed S4 objects and needing a list containing a particular extracted slot from those objects. so i did the following: > setMethod("slot", signature(object = "list"), + function(object, name) + lapply(object, function(i) slot(i, name))) Creating a new generic function for 'slot' in '.GlobalEnv' [1]
2007 Jul 03
1
How to get the names of the classes exported by a specific package.
Hi, I'm writing some functions to generate Rd files for a S4 package. I want to have 2 character vectors with the names of the S4 classes and the methods exported by a package. To get the info about methods I'm using "getGenerics(where="package:FLCore")" however I can not find a similar process to get the S4 classes. Are there functions to access this information ? Best and thanks EJ
2009 Nov 25
1
group generics
I have classes A and B, where B contains A. In the implementation of the group generic for B I would like to use the corresponding group generic for A. Is there a way to do that? I would also appreciate any comments if what I'm trying to do seems like the wrong approach. Here's a stripped down example: setClass("A",
2011 Mar 01
1
changes in recent R-devel revisions?
Hi, I have a BioC infra-structure package that works fine (I can build, check and load it successfully) on revision r53950. The very same package fails on r54591 with the error below: Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : cyclic name space dependency detected when loading ?oligoClasses?, already loading ?oligoClasses? I don't see anything
2006 Dec 01
2
promptClass misses methods
I've had repeated problems with promptClass missing methods, usually telling me a class has no methods when it does. In my current case, I've defined an S4 class "mspathCoefficients" with a print method setMethod("print", signature(x="mspathCoefficients"), function(x, ...) { # etc The file promptClass creates has no methods in it. >
2011 Nov 09
1
Define S4 methods for 'plot'
Hi the list I am creating a package and I have a problem to define a S4 method for plot. I define a class 'A' and a class 'B'. I want to define a function plot for signature c(A,missing) and another method plot for signature c(A,B). My code is the following : In /package/R/ directory: --- main.R --- setGeneric("plot",function(x,y,...){standardGeneric("plot")})