similar to: R.oo error upon construction

Displaying 20 results from an estimated 4000 matches similar to: "R.oo error upon construction"

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 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
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]]
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
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",
2009 Jul 17
1
Help with R.oo
Hi! I'm trying to learn about object oriented R, as it seems like it would be very useful. I'm going over an example from the documentation, and I'm very confused: http://www1.maths.lth.se/help/R/R.oo/ [assume you've called library (R.oo)] setConstructorS3("SavingsAccount", function(balance=0) { if (!is.numeric(balance) && length(balance) != 1)
2008 Dec 10
1
First call to constructor fails (R.oo)
Hi all, I'm trying to do some object-oriented programming in R using the R.oo package. Right from the start I encountered a strange (at least for me) problem. I define a new class/constructor based on the R.oo documentation. However the first attempt to create an object fails: === Code: === library(R.oo); setConstructorS3("MyClass",function(param) { print(param);
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) {
2004 Jun 15
1
Modify but not create permissions
I am still trying to figure out why samba wont let me create in subdirectories I've tripple checked everything and a few things leapt out at me. *) I can modify a file inside a directory that I cannot create a file in. I did not know it was possible under linux to do that. *) If I set all perms on 777 I can create. But neither 775 or 755 will allow it. *) When I go into a mount
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),
2006 May 26
1
R.oo question
This is a simple R.oo question but I, thankfully, hope that someone would explain it to me so I would better understand this work frame. I create this class: setConstructorS3("MyExample", function(param=0) { print(paste("called with param=", param)) extend(Object(), "MyExample", .param = param ); }) >From what is printed out, who made the second call to
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 )
2011 Aug 26
0
R.oo inheritance with pass by reference
I thought I would post an example of using R.oo with inheritance and pass by reference for future searches. With PerMore I am inheriting Person. Then I am changing an object data memeber of an object of PerMore class using pass by reference ('mimiced' by R.oo) in an object of AgeMultiplier. I change a data member in the child class and the parent class for demonstration purposes. This is
2004 Jun 15
1
Cant create in a subdirectory...
I've battled this one for a few days now and its costing my sanity so I am hoping that someone here has an answer I am running the samba server 3.0.4 on a linux 2.4.25 server. I can connect to my share point and authenticate fine I can create files or directories in the root of the sharepoint fine I can go into subdirectories and look at all the files... But I cannot create in any
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
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
2006 Nov 01
0
fatal flaw in popen4 on windows? [WAS] Re: Nonblocking IO read (fwd)
Hi Ara, I''ll take a look. In the meantime, I''ve cc''d the win32utils-devel mailing list to see if anyone has any ideas/suggestions. Regards, Dan > -----Original Message----- > From: ara.t.howard at noaa.gov [mailto:ara.t.howard at noaa.gov] > Sent: Wednesday, November 01, 2006 12:36 PM > To: Berger, Daniel > Subject: fatal flaw in popen4 on windows?
2007 May 17
4
Namespaced model valid #to_xml support in ActiveRecord, ActiveSupport and ActiveResource
Hi, Attached are links to two patches I submitted via the RoR Trac system a week or so ago: http://dev.rubyonrails.org/ticket/8305 http://dev.rubyonrails.org/ticket/8308 I refrained from creating a new Trac ticket for ARes, which will be affected if both of these patches are accepted by Core. There are a couple of workarounds for this issue, but it would be nice for AR, AS and ARes to output
2006 Dec 21
3
[LLVMdev] LLVM capability question.
I'm losing my sanity, so I thought I'd try and generate an LLVM target for the Glasgow Haskell Compiler (GHC). In talking to some of the people in the GHC mailing list some issues have come up that I can't find a ready answer to. (Others came up that I could, so I don't feel quite as stupid or helpless as I could.) 1. Is there any way to hint that a global pointer variable
2007 Jul 25
5
set_default_values rocket science - continuing after_initialize/after_find misfeature
Just starting a new thread so that it''s easy to follow. I just submitted a patch at trac to add a new class method called "set_default_values" ( not a great name I think ), which lets you do all kinds of crazy stuff with setting default values. This ticket is at http://dev.rubyonrails.org/ticket/9093 and example pastie is at http://pastie.caboo.se/81925 It also lets you make