search for: registers3methods

Displaying 13 results from an estimated 13 matches for "registers3methods".

Did you mean: registers3method
2019 Oct 09
2
S3 lookup rules changed in R 3.6.1
tl;dr: S3 lookup no longer works in custom non-namespace environments as of R 3.6.1. Is this a bug? I am implementing S3 dispatch for generic methods in environments that are not packages. I am trying to emulate the R package namespace mechanism by having a ?namespace? environment that defines generics and methods, but only exposes the generics themselves, not the methods. To make S3 lookup work
2019 Oct 09
0
S3 lookup rules changed in R 3.6.1
On 09/10/2019 3:22 p.m., Konrad Rudolph wrote: > tl;dr: S3 lookup no longer works in custom non-namespace environments as of > R 3.6.1. Is this a bug? I don't know whether this was intentional or not, but a binary search through the svn commits finds that the errors started in this one: ------------------------------------------------------------------------ r75127 | hornik |
2012 May 24
1
New S3 methods for optional package
...dency list of A is rather long, and most potential users of B will not be interested in package A and what it depends on. Unfortunately I struggle with doing this right. After asking on the list some time ago, I have listed A under Suggests, and have a .onLoad function in B with if (require(A)) registerS3methods(newMethodsMatrix, package = A, env = environment(B)) But starting with R 2.13 or R 2.14, R CMD check creates a note: "Package startup functions should not change the search path. See section 'Good practice' in ?.onAttach." I have understood that packages with notes can be uploade...
2009 Sep 09
1
Monkey patching +.POSIXt
Hi all, This summer I've been working with a grad student to bring more of the date time classes from JODA (http://joda-time.sourceforge.net/) into R. To make these work seamlessly with existing date time objects, we need to patch +.POSIXt. (The ruby community uses the term monkey-patching for this sort of ill-advised, by sometimes necessary, internal hackery, hence the title.) The problem is
2019 Sep 16
1
Error: package or namespace load failed for ‘utils
...cing R to not load any package at startup time (using > an Renviron file): ``` package <- "utils" lib.loc <- > "<fill this according to your R install>" ns <- > loadNamespace(package, lib.loc) ``` > The code path goes through > `registerS3methods(nsInfo$S3methods, package, env)` and > there to: > ``` if (methods::is(genfun, "genericFunction")) ``` > The evaluation of `methods::is` reaches the line > triggering the error as `.identC(class1, class2)` and > `.identC(class2, "ANY")` both...
2024 Mar 29
1
declare and validate options
Dear r-devel, options() are basically global variables and they come with several issues: * they're not really truly owned by a package aside from loose naming conventions * they're not validated * their documentation is not standard, and they're often not documented at all, it's hard to know what options exist * in practice they're sometimes used for internal purposes, which
2019 Sep 08
6
Error: package or namespace load failed for ‘utils
Hi, When starting an embedded R I encounter the following issue under certain conditions: ``` Error: package or namespace load failed for ?utils? in if (.identC(class1, class2) || .identC(class2, "ANY")) TRUE else {: missing value where TRUE/FALSE needed ``` (more such errors for grDevices, graphics, and stats) And in the end: ``` Warning messages: 1: package ?utils? in
2024 Mar 29
1
declare and validate options
On 29/03/2024 10:52 a.m., Antoine Fabri wrote: > Dear r-devel, > > options() are basically global variables and they come with several issues: > * they're not really truly owned by a package aside from loose naming > conventions > * they're not validated > * their documentation is not standard, and they're often not documented at > all, it's hard to know
2024 Mar 29
1
declare and validate options
> > I think there are too many packages that would need changes under this > scheme. There would be zero if the registration of options is not required for packages first uploaded on CRAN before the feature is implemented. If an option is not registered no validation is triggered and nothing breaks even if we opt in the behavior. > If those functions could be made simple enough and
2015 Dec 22
0
unloadNamespace() does not address unevaluated promises in the S3 Methods Table
...> lazy-load database '{sic}/testUnload/R/testUnload.rdb' is corrupt #> In addition: Warning message: #> In get(method, envir = home) : internal error -3 in R_decompress1 #> Error: package or namespace load failed for ?testUnload? Upon investigation this is because the code in registerS3Methods creates a promise using 'delayedAssign' for 'print.object' function in the '.__S3MethodsTable__.' environment within the base environment (which is where the 'print' generic is defined). (see lines 1387-1489 in src/library/base/R/namespace.R). When the second instal...
2010 Feb 08
2
Error on start R in server
...99 then 97 Warning: stack imbalance in '<-', 84 then 85 Warning: stack imbalance in '{', 82 then 84 Warning: stack imbalance in 'if', 80 then 82 Traceback: 1: .getClassFromCache(Class, where) 2: getClassDef(cl) 3: methods:::is(genfun, "genericFunction") 4: registerS3methods(nsInfo$S3methods, package, env) 5: loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) 6: doTryCatch(return(expr), name, parentenv, handler) 7: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8: tryCatchList(expr, classes, parentenv, handlers) 9: tryCatch(expr, err...
2006 Apr 24
0
R 2.3.0 is released
I've rolled up R-2.3.0.tar.gz a short while ago. This version contains several changes and additions, mostly incremental. See the full list of changes below. You can get it (in a short while) from http://cran.r-project.org/src/base/R-2/R-2.3.0.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. Binaries for various platforms will appear in due course. There is also a
2006 Apr 24
0
R 2.3.0 is released
I've rolled up R-2.3.0.tar.gz a short while ago. This version contains several changes and additions, mostly incremental. See the full list of changes below. You can get it (in a short while) from http://cran.r-project.org/src/base/R-2/R-2.3.0.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. Binaries for various platforms will appear in due course. There is also a