Displaying 20 results from an estimated 900 matches similar to: "Possible setClassUnion Unloading Issue"
2018 Nov 03
1
odd NOTE in R CMD check of data; Rcpp module related
With the current version of the "raster" package (that I maintain), R CMD
check on packages "soilDB" and "PopGenReport" have this NOTE:
Package: soilDB
Check: data for non-ASCII characters
New result: NOTE
Error in .requirePackage(package) :
unable to find required package 'raster'
Calls: <Anonymous> ... .findInheritedMethods ->
2024 Sep 27
1
Disabling S4 primitive dispatch during method resolution affects namespace load actions
Hello,
This problem originally surfaced as an interaction between 'brms',
'rstan' and 'Rcpp' [1]: a call to dimnames() from the 'brms' package on
an object of an S4 class owned by the 'rstan' package tried to load its
namespace. rstan:::.onLoad needs to load Rcpp modules, which uses load
actions and reference classes. Since methods:::.findInheritedMethods
2024 Sep 27
1
Disabling S4 primitive dispatch during method resolution affects namespace load actions
>>>>> Ivan Krylov via R-devel
>>>>> on Fri, 27 Sep 2024 13:32:27 +0300 writes:
> Hello,
> This problem originally surfaced as an interaction between 'brms',
> 'rstan' and 'Rcpp' [1]: a call to dimnames() from the 'brms' package on
> an object of an S4 class owned by the 'rstan' package tried to
2014 Nov 25
0
problem with setGroupGeneric from package methods
Hi,
There seems to be a problem with setGroupGeneric() from package 'methods'. The symptoms are somewhat erratic, in the sense that small changes may lead to any of the following behaviours.
1.Package works without problems on Windows and installs on Linux but gives error when loaded with library().
2.Package installs on both systems and gives error when loaded on any of them.
3.
2019 Sep 27
0
missing imports not detected by 'R CMD check' (?)
>>>>> Henrik Bengtsson
>>>>> on Tue, 24 Sep 2019 11:42:13 -0700 writes
[to me (as maintainer of 'Matrix') and allowed me to answer in public] :
> I ran into a problem where 'R CMD check' on my in-house package, which
> only indirectly depends on 'Matrix', produce errors like:
>
> [where=<environment: namespace:Matrix>,
2004 Oct 06
1
R 2.0.0: namespaces, S4 classes & versioned package installation: failure to resolve correct pkg version
Hi,
further down from the problem I asked about yesterday I encounter the following
problem (please appologize for the lengthy mail - I have not found a brief example
making the issue clear):
- using R packages making use of namespaces &
- S4 classes
when using
--with-package-versions in the install call:
Pkgs install ok and the first pkg 'base' can be loaded in R
2015 Jan 21
0
reducing redundant work in methods package
Note that setMethod() resolves .BasicFunsList in the methods namespace
directly when setting a method on a primitive. Somehow there should be
consistency between genericForPrimitive() and the check in setMethod().
Also, we can probably step away from the use of elNamed(), given that [[
now uses exact matching.
Have you tried patching methods to use .BasicFunsList directly as in
setMethod?
On
2015 Jan 21
2
reducing redundant work in methods package
Hi all,
The function call series genericForPrimitive -> .findBasicFuns -> .findAll
happens 4400 times while the GenomicRanges package is loading. Each time
.findAll follows a chain of environments to determine that the methods
namespace is the only one that holds a variable called .BasicFunsList. This
accounts for ~10% of package loading time. I'm sure there is some history
to that
2015 Jan 22
0
reducing redundant work in methods package
I also just noticed that there is a bug: identical(ans, FALSE) should
be is.null(ans).
So no error is thrown:
> methods:::genericForPrimitive("foo")
NULL
Will fix.
On Wed, Jan 21, 2015 at 3:13 PM, Peter Haverty <haverty.peter at gene.com> wrote:
> Doing it like this:
>
> genericForPrimitive <- function(f, where = topenv(parent.frame()), mustFind
> = TRUE) {
2015 Jan 21
2
reducing redundant work in methods package
Doing it like this:
genericForPrimitive <- function(f, where = topenv(parent.frame()), mustFind
= TRUE) {
ans = .BasicFunsList[[f]]
## this element may not exist (yet, during loading), dom't test null
if(mustFind && identical(ans, FALSE))
stop(gettextf("methods may not be defined for primitive function %s
in this version of R",
2003 Sep 28
1
infinite recursion during package installation with methods, setAs
I ran into a problem recently trying to update a package which uses S4
methods using a recent beta of R. I think I can reproduce it with a
simple example. I have package called `testpkg' in directory testpkg/.
In the R/ subdirectory of testpkg/ I have a file called testpkg.R which
contains the following two lines:
setClass("testpkg", representation(pts = "list"))
2007 Jul 18
1
possible bug R CMD check: No space(s) allowed after \VignetteDepends{}
R CMD check gives an error when a vignette entry %\VignetteDepends{} has any
extra space at the end.
Maybe this is by design, but I found it confusing.
Changing the function "vignetteMetaRE" in tools package could solve the
problem. I.e.
vignetteMetaRE <- function(tag)
paste("[[:space:]]*%+[[:space:]]*\\\\Vignette", tag,"\\{([^}]*)\\}", sep
= "")
2012 Nov 27
0
Puzzling behavior while testing
I'm testing a new release of survival, executing the following piece of code:
....
for (testpkg in survdep) {
z <- testInstalledPackage(testpkg, outDir="tests")
cat(testpkg, c("Ok", "Failed")[z+1], "\n", file="progress", append=T)
}
The vector survdep contains the names of all 156 packages listed as reverse depends on the
CRAN
2020 Sep 24
0
Is it possible to simply the use of NULL slots (or at least improve the help files)?
I did ?"NULL<tab> at the command line and was lead to ?"NULL-class" and the BasicClasses help page in the methods package.
getClass("NULL"), getClass("character") show that these objects are unrelated, so a class union is the way to define a class that is the union of these. The essence of the behavior you would like is
2020 Feb 18
0
Possible Regression in setClassUnion between 3.5.0 and 3.6.0
Hi Robert,
This looks like a bug to me (tested in R 3.6.2 on Windows), f(new("a"))
should return "hi!". I'll add that this DOES work properly in 3.6.1
which leads me to suspect this could be due to the subtle change in the
way method dispatch was performed to fix a different bug, in 3.6.2. Can
anybody else confirm that?
On 2/18/2020 9:32 AM, Robert Harlow wrote:
>
2009 Feb 11
1
setClassUnion with numeric; extending class union
Dear list:
I am looking for a good way to create an S4 class that would extend
numeric, but would allow NULL instead of data as well. As far as I can
see there is no way at the moment to do that, but please correct me if I
am wrong. The best solution I came up with so far was the following (it
also indicates a problem of using setClassUnion with numeric as one of
the classes):
I define a class
2020 Oct 06
0
S4 - inheritance changed by order of setClassUnion and setAs()
Andreas,
As far as I can tell (/conjecture), this is because the list of classes a
particular class inherits from directly is appended to as needed, and so
the order that a class extends others isd refined by the order that those
connections are defined.
We can see this with two setClassUnion calls, rather than required setAs:
> setClass("grandma", slots = c(a =
2016 Jul 30
0
strange behavior in 'inherits' check for loaded S4 object
>>>>> Kevin Ushey <kevinushey at gmail.com>
>>>>> on Fri, 29 Jul 2016 11:46:19 -0700 writes:
> I should add one more item that may be related here --
> calling 'methods:::.requirePackage' returns a different
> result based on whether the package namespace is already
> loaded or not.
> If the package namespace is
2004 Oct 14
2
setClassUnion
Hello,
I have a question concerning "setClassUnion".
I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000.
I tried to use "setClassUnion" in a package I am currently working on. The
situation is similar to the following example:
The DESCRIPTION file has entries:
Depends: R (>= 2.0.0), methods
Imports: methods
LazyLoad: yes
The NAMESPACE file has
2004 Oct 14
2
setClassUnion
Hello,
I have a question concerning "setClassUnion".
I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000.
I tried to use "setClassUnion" in a package I am currently working on. The
situation is similar to the following example:
The DESCRIPTION file has entries:
Depends: R (>= 2.0.0), methods
Imports: methods
LazyLoad: yes
The NAMESPACE file has