Displaying 20 results from an estimated 600 matches similar to: "strange behaviour of callNextMethod in S4 methods"
2012 Apr 06
1
Compatibility problem with R-2.9.0 and R-2.14.0
Hello all,
Using classical glm function with binomial family, I experienced a problem when using predict() over
a glm object.
I found that family objects built on R-2.14.0 contain elements like :
.Call(C_logit_link,...)
But on R-2.9.0, the object C_logit_link can not be found. Instead, this prior version used to call
more simply :
.Call("logit_link",...)
which causes no problem.
Is
2017 Jul 21
0
Problem with mclapply in package parallel
Dear fellow R users,
I am experiencing some problem using function mclapply from recommended R package parallel. This problem is a bit "deep in source code" (maybe r-devel list would be more appropriate ?).
Actually, I have noticed on a specific Linux HPC system that the various readChild() calls in mclapply did not end the children processes, as would be expected (ie compared to what
2012 Aug 03
1
Interaction between callNextMethod() and selectMethod()
Hi,
Strange things happen. Here is a simple example:
> setClass("A", contains="integer")
> setMethod("as.matrix", "A", function(x, ...) t(callNextMethod()))
Creating a generic function for ?as.matrix? from package ?base? in
the global environment
[1] "as.matrix"
> a <- new("A", 1:3)
> as.matrix(a)
2007 Dec 24
0
callNextMethod() with builtin group methods fails to create proper environment
Hi all,
After all these years, I am finally porting some R-2.3.1-based S4 object
code to R-2.6.1, dealing with all the S4 object system changes that came
in R-2.4.0.
I've run across what appears to be some sort of ommission in the
implementation of callNextMethod() when used with primitives having
group generic methods.
In a stock R-2.6.1 patched (happens to be running on AMD64/RHEL 4, but
2005 Apr 20
1
callNextMethod()
I have built a sequence of eight S4 classes, each of which inherits
from the previous one but adds extra slots.
I have a corresponding generic function for which I have described
methods for each of these classes in a signature with one other
variable. There are also some ad hoc variable outside the signature
which have different default values for each class.
Each method calls
2011 Dec 09
1
'callNextMethod' in a '[<-' function does not work ?
Hi the list,
I try to use callNextMethod in a setteur ([<-) but it does not work.
Any raison ?
Any other option ?
--- 8< ------------------
### Class B0 ###
setClass("B0" , representation(b0 = "numeric"))
setReplaceMethod("[","B0",function(x,i,j,value){x at b0 <- -value})
a <- new("B0")
a at b0 <- 3
a
a["b0"] <- 3
a
2003 May 21
1
callNextMethod
Hi,
I don't understand why this code doesn't work (f(b2)):
/////////////////
setClass("B0", representation(b0 = "numeric"))
setClass("B1", representation("B0", b1 = "character"))
setClass("B2", representation("B1", b2 = "logical"))
f <- function(x) class(x)
setMethod("f", "B0",
2010 Jul 20
1
Extract callNextMethod "array" calls "matrix"?
I have a class that extends array and my method for "[" stops with an error:
> setClass("A", contains="array")
[1] "A"
> setMethod("[", "A", function(x, i, j, ..., drop = TRUE) new("A",
callNextMethod()))
[1] "["
> a<-new("A",array(1:12,c(4,3,1)))
> a
An object of class "A"
, , 1
2007 Mar 04
1
Problem using callNextMethod() in S4
Dear all,
Maybe, I am doing something wrong, but using R-2.5.0 on my Intel-Mac, I
have problems
using function callNextMethod() in method initialize.
I am loading the following code as file "testS4.R":
setClass("baseClass",
representation(myname = "character",
mydir = "character",
"VIRTUAL"),
2010 Jan 13
1
bug in callNextMethod (PR#14185)
Hi,
there seems to be a possible bug in callNextMethod in conjunction with
the [-operator.
Relevant info, minimal example and sessionInfo follow below:
###############################
setClass("foo", representation = representation(a = "numeric"))
setClass("bar", contains = "foo")
setMethod(
f = "[",
signature =
2008 Sep 09
0
Defining an alias for a generic function and callNextMethod() strange behaviour
Hi,
My package contains the following foo() generic and methods (simplified
version):
setGeneric("foo", signature="x", function(x, y=NA) standardGeneric("foo"))
setMethod("foo", "ANY", function(x, y=NA) list(x, y))
setMethod("foo", "character", function(x, y=NA) unlist(callNextMethod()))
> foo(5)
[[1]]
2012 Nov 06
2
Question on callNextMethod
I don't understand why I get the following results. I define two classes
'Base' and 'Derived', the latter of which 'contains' the first. I then
define a generic method 'test' and overload it for each of these classes. I
call 'callNextMethod()' in the overload for Derived. From the output, it
appears that the overload for Base gets called twice. Why is
2006 May 11
2
S4 initialize methods, unexpected recursive callNextMethod
Hi,
Given a simple three class hierarchy: A <-- B <-- C
I want to define an initialize method for each class such that when I
call new("C", x=5), the initialize methods for A and B are used to
incrementally build the object.
When I do what seems obvious to me using callNextMethod, I get an
infinite recursion. An example follows...
setClass("A",
2002 Feb 14
1
netCDF
Thomas,
I'm using your package netCDF. Thanks for making
it and for leave it available for public use.
It took me a little while installing it, as my
netcdf library is libnetcdf.a (not libnetcdf)
and my library directory is not /usr/local/lib.
Finally, I was able to install with the following:
1. ln -s libnet.a libnet (in my usr/local/netcdf-3.5.0/lib directory)
2. R CMD INSTALL
2009 Jun 15
2
[LLVMdev] Regular Expressions
Chris Lattner wrote:
> However, I don't see any reason to base this off of strings. Instead
> of passing down "f32" as a string, why not do something like this
> pseudo code:
>
> class X86ValueType {
> RegisterClass RegClass;
> ...
> }
>
> def X86_f32 : X86ValueType {
> let RegClass = FR32;
> ... };
> def X86_i32 :
2009 Dec 03
2
[LLVMdev] Duplicate Label in Generates ISel
I've got the following problem in the X86 selector generated by
TableGen:
llvm/lib/Target/X86/X86GenDAGISel.inc:91821: error: duplicate case value
llvm/lib/Target/X86/X86GenDAGISel.inc:91442: error: previously used here
This seems to happen because of a pattern I added for VEXTRACTF128 which uses
extract_subreg:
[(set DSTREGCLASS:$dst,
(DSTTYPE (extract_subreg
2009 Jun 13
0
[LLVMdev] Regular Expressions
On Jun 11, 2009, at 2:01 PM, David Greene wrote:
> On Thursday 11 June 2009 12:28, Chris Lattner wrote:
>>>
>>> Yes. I want TableGen to be able to infer lots of stuff
>>> programmatically.
>>> This helps tremendously when specifying things like, oh, AVX. :)
>>
>> I don't see how this relates to regex's, and really don't want to
2009 Jun 05
2
S4: When is validObject issued? (or why S4 is killing me:( ..
Dear UseRs,
Does anyone know when exactly the validity is checked in S4? Documentation is silent:(.
Here is a small example:
setClass("test1",representation(a="numeric"))
setMethod("initialize","test1",
function(.Object,...){
a<-runif(1) ## here slot "a" is initialized ##
callNextMethod(.Object,a=a,...)
2009 Dec 03
0
[LLVMdev] Duplicate Label in Generates ISel
On Thursday 03 December 2009 13:39, David Greene wrote:
> I've got the following problem in the X86 selector generated by
> TableGen:
>
> llvm/lib/Target/X86/X86GenDAGISel.inc:91821: error: duplicate case value
> llvm/lib/Target/X86/X86GenDAGISel.inc:91442: error: previously used here
>
> This seems to happen because of a pattern I added for VEXTRACTF128 which
> uses
2015 Feb 23
2
[LLVMdev] Eliminating redundant loads
On 23 February 2015 at 11:22, David Jones <djones at xtreme-eda.com> wrote:
> You have not installed the DataLayout in the Module, as I had pointed out
> earlier.
>
Hi David,
I reported earlier that I tried this but there was no improvement.
Well I ran another test to be sure. The results are below. As you can
see the loads are still present.
; ModuleID =