Displaying 20 results from an estimated 400 matches similar to: "Methods dispatch and inheritance R.oo"
2011 Aug 26
1
R.oo data members / inheritance
If someone is able, can you tell me if there is a better way to do this?
More specifically, do I have to rewrite all of the data members stuff and
extend stuff of parent class in the child class? See below. Thanks in
advance!
Example 1:
setConstructorS3("ClassA", function(A,x) {
if(missing(A))A=15;
if(missing(x))x=NA;
extend(Object(), "ClassA",
.size = A,
.x=x
2009 Jul 07
2
[LLVMdev] How to add an include file
Hi Eli,
Let's say I have a file ClassA.h, that pairs with a file ClassA.cpp
to product a library libClassA.a.
ClassA.h contains the single declaration.
class A {...};
I want to transform it to:
#include "ClassB.h"
class A : public class B {...};
ClassB.h is the header file for a library libClassB.a built from ClassB.cpp
and ClassB.h.
I can clearly link libClassB with libClassA.
2009 Jul 07
0
[LLVMdev] How to add an include file
On Tue, Jul 7, 2009 at 1:42 AM, David Minor<dahvid.minor at gmail.com> wrote:
> Hi Eli,
> Let's say I have a file ClassA.h, that pairs with a file ClassA.cpp
> to product a library libClassA.a.
> ClassA.h contains the single declaration.
>
> class A {...};
>
> I want to transform it to:
>
> #include "ClassB.h"
>
> class A : public class B
2002 May 21
4
setClass() and packages
Where should the setClass() ('methods' package) calls be placed in a
package? I try to follow a one-class-one-file principe, but since
setClass("ClassA", "ClassB") has to come a after setClass("ClassB", [snip])
it is not possible to fully follow this rule. So the best I can do now is to
put all setClass() calls in a file named "000.R" (I know this
2006 Oct 03
2
Rails transactions issue with rollback.
Hi,
I have a transaction in which a duplicate key exception is being thrown
by MySQL. I assume this happens when I try to do a save. The problem
is that before the save, I do a destroy on another object as part of the
transaction. Catching the exception by doing this,
User.transaction do
begin
objA.destroy
objB.save <-- causing exception
rescue Exception => exc
2011 Aug 18
0
Call super methods from inherited classes R.oo
Hi R-community,
I'm very busy with a software project which I would like to development
completely with R.oo. Many of the object oriented aspects that I already
know from Java development seems to be in place with this library.
But...there is something that I'm really missing... *the super method call*
Just a little example that shall demonstrate what I mean:
Image we have the following
2010 Nov 19
1
JRI and error message from R_isMethodsDispatchOn
Dear R users,
I have a small project written in Java and need some statical tools.
Therefore, I used JRI (in rJava package) as an interface between R and
Java to write some wrappers for my work. However, I received error
message from R while I have more than one java method which wraps R:
Error in .Call("R_isMethodsDispatchOn", onOff, PACKAGE = "base") :
Incorrect
2009 Jul 05
0
[LLVMdev] How to add an include file
On Sun, Jul 5, 2009 at 1:16 PM, David Minor<dahvid.minor at gmail.com> wrote:
> I'm writing a code transformation that involves adding an include to
> existing code, adding a base class
> to and existing class and then linking with a previously compiled library.
> The main problem for me
> seems to be how can I add the include? Can I compile the include alone to
> byte
2009 Jul 05
2
[LLVMdev] How to add an include file
I'm writing a code transformation that involves adding an include to
existing code, adding a base class
to and existing class and then linking with a previously compiled library.
The main problem for me
seems to be how can I add the include? Can I compile the include alone to
byte code and pre-pend it?
Should I compile the library, which includes the include and parse out the
include and
2003 Oct 02
1
"[[<-","[[" default?
Hi!
I have implemented class specific behaviour of "[[<-.myclass"<-function().
How it is posible to call the "[[.default" on an object of myclass?
Eryk
Dipl. bio-chem. Eryk Witold Wolski @ MPI-MG Dep. Vertebrate Genomics
Ihnestrasse 73 14195 Berlin 'v'
tel: 0049-30-84131285 / \
mail: wolski@molgen.mpg.de ---W-W----
2003 Sep 18
1
2 time dependend states and probability transition matrix
Hi,
have got anybody experience or a starting
point for me, how i can program a function
which calculate me a probability transition matrix with a data.frame and two states.
I have some independend variable and a class variable
for two states - in example one from Jan2003 and the same variables from June2003.
Now i would like to calculate the probability that PERSON X change
from classA to
2007 Jul 12
11
Problem with "defined" keyword
Hi,
I''m running Puppet 0.23.0 on my servers, and i got something like this:
In a classa.pp file (included in site.pp):
class A {
file { "test1":
...
}
}
In a classb.pp file (included in site.pp):
class B {
file { "test2":
...
}
if defined(File["test1"]) {
... do things ...
}
if
2011 Jun 23
1
Class not found when search in .onLoad
Hi,
I am facing with a strange behaviour of isClass and extends when these
are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing
my package from doing some object initializations at a proper place
(i.e. in .onLoad).
Suppose one defines two S4 classes in a package, and that one needs to
check the inheritance between these two when loading the package (e.g.
to validate slots
2011 Oct 24
0
R.oo package: do setMethodS3 work upon construction
Hello (Heinrich),
I did not know I could do this. It doesn't seem to be documented anywhere.
Thought this would be helpful to the fraction of the community using package
R.oo. Note the call of a setMethodS3 method, xOne, in the setConstructorS3.
This is extremely useful if xOne (in this case) is a very complex method
(that you always want to be called every time you create a new object). If I
2009 Jul 08
1
[LLVMdev] How to add an include file
I see,
Adding includes is trivial even w/o llvm, but the real problem here is
manipulation of classes, if I understand you correctly adding an inheritee
wouldn't be possible.
David
On Tue, Jul 7, 2009 at 12:43 PM, Eli Friedman <eli.friedman at gmail.com>wrote:
> On Tue, Jul 7, 2009 at 1:42 AM, David Minor<dahvid.minor at gmail.com> wrote:
> > Hi Eli,
> > Let's
2011 Sep 22
1
R.oo: do work on data member at construction
Hello,
I'd like to 'do work' on data members upon construction (i.e. without
implementing it in a get method). Is this the best way to create data member
'z' upon construction? I'm thinking if .z=paste(x,y) below gets more complex
I'll run into issues.
setConstructorS3("MyClass", function(x=NA,y=NA,...) {
this <- extend(Object(), "MyClass",
2011 Aug 23
1
R.oo modify an object inside another classes method
Can someone show me how to modify one (R.oo) class's object inside another
(R.oo) class's method? Is that possible with the R.oo package? A quick
example or reference to an example would be outstanding...
Thanks,
Ben
[[alternative HTML version deleted]]
2008 Oct 24
1
Help regarding oo package
Hi Henrik,
I'm sorry to be bothering you, but there is something that I have been
stuck with for a while now.
I am trying to create a class like :
setConstructorS3("MyPTCM",function(tokenslist=0)
{
extend(Object(), "MyPTCM",
.gamma = 0.0,
.rho = 0.0,
.phi = 0.0,
.tokenslist = tokenslist,
.uniquetokens = unique(tokenslist),
2011 Jun 16
1
Question about R.oo package
Dear R.oo package users,
while testing some functionality of the R.oo, I found that during the first construction of a object from a class, the constructor is twice called, but only one object is finalized.
In all subsequent creation processes, the constructor is (expectedly) called once.
Here some example code:
library(R.oo)
setConstructorS3("Test_class",function(val) {
2007 Jul 29
7
RDig and AAF playing together
I have a site with two indexes. Index A is created offline by RDig
and queried from the web via RDig (specifically,
RDig.searcher.search). Index B is managed by AAF with :remote =>
true. Simple enough. However, I need to query both indexes from RDig.
Usually this is ok, as I modified RDig to accept an array of
search_paths with an element for index A and index B.
However, when Index