similar to: Reference classes: accessor functions via 'getRefClass(...)$accessors(...)'

Displaying 20 results from an estimated 1000 matches similar to: "Reference classes: accessor functions via 'getRefClass(...)$accessors(...)'"

2010 Nov 23
1
Reference Classes: removing methods -> implications for objects/instances of that class
Dear list, just to make sure that I understand 'unregistering' methods for S4 reference classes correctly: If I registered a method and want to 'unregister' (i.e. remove) this method again, objects/instance created of the respective class still feature the removed method until I do an explicit reassign ('my.instance <- getRefClass("Classname")$new()'), right?
2011 Mar 07
1
WG: Reference classes: error with missing arguments in method calls
Dear list, a while ago I posted this at r-devel but got no answers. Hope it?s okay to give it a shot again by cross-posting it here. TIA for any comments, Janko Von: Janko Thyson [mailto:janko.thyson.rstuff at googlemail.com] Gesendet: Montag, 21. Februar 2011 00:58 An: r-devel at r-project. org (r-devel at r-project.org) Betreff: Reference classes: error with missing arguments in method calls
2011 Jun 06
1
How can I write methods for 'as()'?
Dear list, I wonder how to write methods for the function 'as' in the sense that I can call 'as(object, Class, strict=TRUE, ext)' and let method dispatch figure out the correct method. AFAIU, there is a difference between, e.g. 'as.data.frame' and the methods of 'as()' as stated above since the former depends on arg 'x' instead of 'object',
2011 Jun 29
1
Ref Classes: bug with using '.self' within initialize methods?
Dear list, I'm wondering if the following error I'm getting is a small bug in the Reference Class paradigm or if it makes perfect sense. When you write an explicit initialize method for a Ref Class, can you then make use of '.self' WITHIN this initialize method just as you would once an object of the class has actually been initialized? Because it seems to me that you can not.
2011 Jun 06
1
Reference Classes: shortcut like 'isS4' for Ref Classes?
Dear list, is there a shortcut-function to check whether a class is a Reference Class or not? There's something like this for S4 classes ('isS4(object)'), but I couldn't find anything regarding Ref Classes. Currently, I'm doing it this way, which is a bit clumsy: A <- setRefClass("A", fields=list(X="numeric")) a <- A$new() isRefClass <-
2010 Nov 21
1
Ref classes: can I register fields as I register methods?
Hi there, is it possible to register fields as you can register methods with getRefClass("Classname")$methods(.)? I know that you should usually give some thought on which fields you need and hardcode them in the class def. But I''m playing around with dynamically creating/extending sort of a template class that already offers basic functionality shared by all objects
2011 May 27
1
Reference Classes/S4 Classes: can method dispatch check superclasses BEFORE resorting to method for "ANY"?
Dear list, is it possible that method dispatch checks for superclasses/virtual classes before checking "ANY"? I'd like to build a generic initialization method for all my Reference Class (say "MyDataFrame") objects by having them inherit from class, say "MyRefClassVirtual" (which would have to be a virtual S4 class; there are no virtual Reference Classes,
2010 Nov 24
2
Reference Classes: how to clone/copy instances?
Dear list, I don't know what's the correct term for this in the OOP context, but is it possible to "clone"/copy an instance of a reference class (say 'a') so that I get an *autonomous* second instance 'b'? Autonomous in the sense that changes to 'a' do not affect 'b'. I know that this is somewhat against the pass-by-reference paradigm, but the
2016 Apr 14
2
Previously extended schema not working in 4.4.0
On Thu, 2016-04-14 at 18:07 +0100, Jonathan Hunter wrote: > On 14 April 2016 at 13:37, Jonathan Hunter <jmhunter1 at gmail.com> > wrote: > > > # samba-tool dbcheck --cross-ncs > > Checking 4079 objects > > MYOBJ=value,OU=myou,DC=mydomain,DC=org,DC=uk: 0x00290001 > > MYOBJ=value,OU=myou,DC=mydomain,DC=org,DC=uk: 0x0029000a > >
2010 Nov 04
2
Roxygen: @example tag does not work for me
Dear list, somehow I can't get the Roxygen tag "@example" to work for me. My "Roxygen-Header" of a script containing, say, a function looks like this: #' My header #' #' My description #' #' @param a Blabla. #' @param b Blabla. #' @return \code{TRUE}. #' @callGraphPrimitives #' @references #'
2016 Apr 14
2
Previously extended schema not working in 4.4.0
Thank you, Andrew - I hadn't done so. (In a good way, I haven't yet had problems with samba that have caused me to delve quite so deeply into the DB :) so I'm not as familiar with the range of tools as I could be, sorry!) This has flagged up quite a few errors, all along the lines of: # samba-tool dbcheck --cross-ncs Checking 4079 objects MYOBJ=value,OU=myou,DC=mydomain,DC=org,DC=uk:
2009 Jan 02
1
"registering" a generic method for a class
Sorry in advance if this is too simple a question, but I'm stuck with some odd behavior and I can't find the text to rid myself of this (admittedly somewhat trivial) problem. Note that I've done generic programming with S3 "objects" in the past, but I've never really dabbled in creating S4 objects until now. So, I've created a new S4 class, call it
2011 Dec 03
2
Help! Big problem when using "browser()" to do R debugging?
Hi all, Could you please help me? I am having the following weird problem when debugging R programs using "browser()": In my function, I've inserted a "browser()" in front of Step 1. My function has 3 steps and at the end of each step, it will print out the message "Step i is done"... However, after I hit <ENTER> when the program stopped before Step 1
2008 Feb 23
1
Set without argument
Hi the list, I am defining S4 objet. Is it possbile to define a method that change the slot of an object without using <- ? My object contain a numeric and a matrix. At some point, I would like to impute the missing value in the matrix. So I would like to use something like : ----------------- setClass("MyObj",representation(time="numeric",traj="matrix")) a
2011 May 26
0
Reference Classes: strange behavior when trying to change class def in the same R session
Dear list, I'm getting some strange behavior with Reference Classes every once in a while and I can't really put my finger on the cause. It'd be great if someone using Reference Classes could check if he/she experiences similar problems: The thing is that when I alter the definition of a Reference Class in a running R session and source the respective file containing the class
2009 Sep 02
4
diff of two timestamps
Hi all, I have the following problem: I have a csv-file consisting of timestamp values (no dates), e.g.: Timestamp1;Timestamp2; 05:24:43;05:25:05; 15:47:02;15:47:22; 18:36:05;18:36:24; 15:21:24;15:22:04; I need a vector with the difference of the two timestamps, so I read the data with the read.csv-function: myObj <- read.csv("file.csv",header=TRUE,sep=";"). I have then
2011 Jun 29
1
Update MS Windows PATH variable based on a R script
Dear list, this is not directly an R question, but it is somewhat related to R aspects, so I hope it's okay to post it here: I'd like to update my windows PATH based on a script routine in order to make sure that crucial components are contained. Much like what happens at the installation of Rtools (if desired). Now, can you do that from within R or do I need some sort of windows
2005 Dec 07
1
Dots argument in apply method
Hello everyone, I'm working on a package using S4 classes and methods and I ran into the following "problem" when I tried to create an "apply" method for objects of one of my new classes. I've found a way around the problem but I wonder if I did not paint myself into the corner. I'd like your opinion about that. So I have an object "myObj" of class
2010 Jan 15
1
Can an object reference itself?
Dear List, I am not really familiar with any other language than R, but I?ve heard that in other languages there is something called ?self referencing?. Here?s what I?m trying to get an answer for: Suppose there is a function that takes as its input a value of a slot of an S4 object. The function itself is stored in another slot of the SAME S4 object. Is it then possible to have the function
2016 Apr 15
2
Previously extended schema not working in 4.4.0
On Fri, 2016-04-15 at 00:32 +0100, Jonathan Hunter wrote: > Thank you Andrew, really appreciated. > > I have now run 'samba-tool dbcheck --cross-ncs --fix' and it has > successfully fixed some errors; there were 110 previously, however > there are still 69 remaining after a second pass of dbcheck --fix. > > The remaining errors seem to be mainly of this form: >