similar to: R.oo data members / inheritance

Displaying 20 results from an estimated 600 matches similar to: "R.oo data members / inheritance"

2008 Nov 05
1
Methods dispatch and inheritance R.oo
Hi to all members, i have a question about class inheritance and methods using R.oo package: I have the following code and it doesn't work, guess i'm doing smth wrong and there is nothing in the help. library(R.oo) setConstructorS3("ClassA", function(A=15) { extend(Object(), "ClassA", .size = A ); }) setMethodS3("print", "ClassA",
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
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 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.
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",
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
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
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
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
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 Oct 27
1
Difficulties with R.oo (static fields, etc.)
I would like to use R.oo and tcltk to implement a Turtle World. I have encountered many problems because: 1) I am not sure how to implement static fields with R.oo 2) I am not sure how to implement a constructor that would call a function only for the first instance of a class (i.e., to initialize value of static fields only once) 3) I am not sure how to remove/delete cleanly existing
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) {
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 Oct 27
0
R.oo package, inherit two classes
Hello, How do I inherit two classes using the R.oo package. Below is kind of a silly example, but I am trying to create class PerDog from classes Dog and Person. Error at bottom. I've tried a few other ways of using extend(), but nothing seems to get me what I want. Example: setConstructorS3("Person", function(age=NA) { this = extend(Object(), "Person", .age=age )
2005 Aug 21
0
Patch for Element.Class - wrong regexp
Hello, I noticed (due to a recent post by Martin Honnen to clp) that Element.Class uses wrong regexps for its operations. E.g., Element.Class.has() will find "classA" in "classA-foobar" I also changed the interface of .has() to the more general one used in .has_any() --- util.js.old 2005-08-21 19:18:40.000000000 +0200 +++ util.js 2005-08-21 19:31:42.000000000 +0200 @@
2007 Feb 26
1
2 data frames - list in one out put , matrix in another ??
I have two more or less parallel dataframes that are giving me different results on one subset of variables. I know that I assembled the 2 dataframes slightly differently but I don't see why I am getting this result because one set of variables are labelled and the other is not. Variable names are the same, etc. as far as I can acertain. The only diffference seems to be that bdata variables