Displaying 20 results from an estimated 200 matches similar to: "Disabling S4 primitive dispatch during method resolution affects namespace load actions"
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
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 ->
2004 May 27
3
"privileged slots"
Hi all,
in the help for RClassUtils I found the expression "privileged slots" in
function "checkSlotAssignment" with the explanation:
/privileged slots (those that can only be set by accesor functions
defined along with the class itself)/
I thought all slots of a (not private) class can be a accessed by a user
via the @ Operator.
Is there a way to make a single slot of a
2006 Oct 26
1
Pb with .findInheritedMethods
Hi again,
Here is a very simplified version of a class hierarchy
defined in the Biobase package (Bioconductor). I post
here because this seems to be an S4 related problem:
setClass("A", representation(name="character"))
setMethod("initialize", "A", function(.Object) {.Object at name <- "I'm
an A"; .Object})
2007 Jun 19
1
Matrix library error: "should never happen; please report"
Hi,
I got the following error. Sorry but this time I couldn't reproduce it
with a simple chunk of code:
.TM.repl.i.2col(): drop 'matrix' case ...
Error in .nextMethod(x = x, i = i, j = j) :
'i' has no integer column number should never happen; please report
In addition: Warning messages:
1: Ambiguous method selection for "%*%", target
2015 May 05
1
Problem with adding slots to S4 object
There are too many arguments in the signature of the my_inla generic. The
signature defaults to every argument in the formals, which are probably
already over-specified. Typically, one defines a generic with the formals
(x, ...), or perhaps in this case (x, model, ...), but more on that below
Unrelated to this issue, the my_inla generic is defined incorrectly. It
should call
2006 Sep 15
1
setMethod() woes
Hello everybody
R version 2.4.0 alpha (2006-09-15 r39323), MacOSX 10.4.7
Next S4 problem.
I have "brob" objects that are large real numbers, and now I want "glub"
numbers that are to be a pair of glubs that represent complex numbers.
I want to define binary operator "+" so that if either the left or right
argument are glubs, it uses .ArithGlub.
If either
2008 Aug 27
1
S4 coercion
I am extending a DBI connection by
setClass("TSPostgreSQLConnection",
contains=c("PostgreSQLConnection","TSdbOptions"))
but the first time I use this I am getting a warning when it tries to
coerce the TSPostgreSQLConnection to a PostgreSQLConnection. After the
first use the warning stops, but the first warning is causing me
problems when I do automatic checks
2015 May 04
2
Problem with adding slots to S4 object
Dear all,
I'm trying to create a virtual S4 class with some subclasses. I noticed
that adding slots to this class increases the memory use and slows the
functions down. Note that I'm adding very small slots (integer or character
both of length 1).
I've made a reproducible example at
https://github.com/ThierryO/testvirtualclass. The R CMD check --as-cran
fails on the tests.
Some of
2015 May 05
0
Problem with adding slots to S4 object
Dear all,
I did some more work in this.
- put all the metadata in a dedicated subclass (see metadataclass branch in
github repository). This doesn't solve the problem.
- test the code under R 3.1.2. This gives the same problem. So this is NOT
a bug introduced by R 3.2.0 :-)
- Profiling the code. Below the summary (code is on GitHub). It seems like
most of the time is spent by paste(). Note
2006 Feb 27
0
method dispatch and in-place modification? - unclass, RemoveClass, getDataPart, method dispatch
I have a little problem about method dispatch and "unnessary" copying.
Basically what I would like to do is:
`[.myclass` <- function(x, i,j, extraopt=TRUE/FALSE, drop=TRUE) {
...do stuff depending on extraopt...
value <- Nextmethod("[", x, i,j, drop=TRUE)
... do more stuff depending on extraopt...
}
I have two general problems:
(1) NextMethod() really
2009 Mar 29
1
Recent setClass fails where previous succeeded
These lines of code
setClass("A", representation(x="numeric"))
setMethod(initialize, "A", function(.Object, ...) stop("oops"))
setClass("B", representation("A"))
result in
> setClass("B", representation("A"))
Error in initialize(value, ...) : oops
in
R version 2.9.0 alpha (2009-03-28 r48239)
R version 2.10.0
2010 Feb 02
1
S4 setClass / initialize misunderstanding
Hi, I recently ran into this problem. I couldn't find any mention of it in
the setClass documentation.
setClass("Foo", representation(file = "character"))
setMethod("initialize", "Foo", function(.Object, file) {
print(file)
})
setClass("Bar", contains = "Foo")
And the error:
Error in print(file) : argument "file" is
2011 Oct 10
1
pmml for random forest & rules
Hi,
I am having some trouble using R 2.13.1 for generating a pmml object
of of class "c('randomForest.formula', 'randomForest')"
I see that these methods are available:
> methods(pmml)
[1] pmml.coxph* pmml.hclust* pmml.itemsets* pmml.kmeans*
pmml.ksvm* pmml.lm* pmml.multinom* pmml.nnet*
pmml.rpart*
[10] pmml.rsf* pmml.rules* pmml.survreg*
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
Hello Folks,
When I run the document below through sweave, rgui.exe/rsession.exe
leaves a file handle open to the sweave-001.pdf graphic (as verified by
process explorer). Pdflatex.exe then crashes (with a Permission Denied
error) because the graphic file is locked.
This only seems to happen when there is an error in the sweave document.
When there are no errors, no file handles are left open.
2018 May 05
1
error in chol.default((value + t(value))/2) : , the leading minor of order 1 is not positive definite
Dear friends - I'm having troubles with nlme fitting a simplified model
as shown below eliciting the error
Error in chol.default((value + t(value))/2) :
? the leading minor of order 1 is not positive definite -
I have seen the threads on this error but it didn't help me solve the
problem.
The model runs well in brms and identifies the used parameters even with
fixed effects for TRT?
2016 Jul 29
2
strange behavior in 'inherits' check for loaded S4 object
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 not loaded, the package is loaded and
attached, and the package environment is returned:
> methods:::.requirePackage("digest")
Loading required package:
2016 Jul 31
2
strange behavior in 'inherits' check for loaded S4 object
(Just returning from the "wilds" of Canada, so not able to comment on the specifics, but ...)
There is a basic point about generic functions that may be related to the "private" class question and my earlier remarks that Martin alluded to.
R (and S4 before it) allows packages to define methods for a generic function in another package. Say, for plot() in graphics.
The
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
2009 Jun 26
0
Modifying Sweave.sty to allow escapes with fancyvrb package in LaTeX
Dear Colleagues:
In an attempt to have things like # See page \pageref{this} inside
comments in R code chunks I have modified Sweave.sty as below. I have
followed fancyvrb's manual with regard to the use of the commandchars
argument. But when compiling with LaTeX (using attached test file) I
get a LaTeX error
(/usr/share/texmf-texlive/tex/latex/ae/t1aett.fd)
! Missing \endcsname