similar to: Question about copying reference objects using the initialize method

Displaying 20 results from an estimated 1000 matches similar to: "Question about copying reference objects using the initialize method"

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 Feb 01
1
Help need to define method of an s4 class
I need some help in defining a "print" method for my new S4 class definition. So fer I have worked like this: setClass("MyClass", sealed=F, representation(slot1 = "list", #create a new class slot2 = "vector", slot3 = "vector", slot4 = "vector")) setMethod("print",
2011 Jun 01
1
possibly invalid assertion in setRefClass?
> setRefClass("Foo", fields = list()) Error in setRefClass("Foo", fields = list()) : A list argument for fields must have nonempty names for all the fields In my opinion, the above should not fail. There are no fields. Thanks, Michael [[alternative HTML version deleted]]
2010 Nov 22
2
Check for is.object
Hello, I am trying to recursively append some data from multiple files into a common object For this, I am using in a loop NewObject <- rbind(NewObject,tempObject) For the first loop, obviously there is no NewObject ... so I wanted to do NewObject <- tempObject[0,] Now when it loops again I want to put the statement do "NewObject <- tempObject[0,]" inside a if statement
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 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,
2011 Mar 30
3
how about a "<p-" operator?
I was cursing Matlab again today (what else is new) because the default action for every Matlab command is to spew the result to the console, and one must remember to put that darn ";" at the end of every line. So I just wondered: was there ever a discussion as to providing some modified version of the "<-" and "->" operators in R to do the reverse?
2011 Sep 24
1
Can't reliably use RefClass methods in Snowfall
Greetings, I am trying to use Reference Class methods in Snowfall, using R 2.12.1 on Ubuntu Natty. Using then directly seems to work (stanza 2 below), but using them indirectly does not (stanza 3 below). I get an "attempt to apply non-function" error. In addition to exporting the instance of the object I created to the Snowfall slaves, I also made several attempts to export the
2011 May 04
1
General "nil" reference class object
Dear John and others, I've been wondering about whether there's any way to indicate a "nil" reference class object, which will represent "no value", and be tested for, but not fail the internal type checking. NULL is the obvious choice (or seems so to me), but can only be used if an explicit class union is created: > Foo <- setRefClass("Foo") > Bar
2010 Nov 17
2
Reference classes: accessor functions via 'getRefClass(...)$accessors(...)'
Hi there, I''d like to choose between an "static" and "dynamic" access of a reference class field, say ''a''. myObj <- getRefClass("Blabla")$new() Static: myObj$a Dynamic: myObj$a.get() where the function retrieves the data from a database (or some other location), stores it to a buffer and
2011 Mar 28
0
[LLVMdev] array index access
On Mon, Mar 28, 2011 at 12:48 PM, George Baah <georgebaah at gmail.com> wrote: > Oh I see what you mean but I don't think that is the value that I want. > In the code, I know that > %N = load i32* %k, align 4 > %p = getelementptr inbounds [10 x [20 x i32]]* %3, i32 0, i32 %M, i32 %N > So I analyze the GEP and know that %N is a pointer to an int32, which is the > array
2007 Oct 15
0
8 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_sound.c libswfdec/swfdec_sound.h test/trace
libswfdec/swfdec_as_interpret.c | 65 ++------- libswfdec/swfdec_sound.c | 24 --- libswfdec/swfdec_sound.h | 4 test/trace/Makefile.am | 27 +++ test/trace/enumerate-5.swf |binary test/trace/enumerate-5.swf.trace | 6 test/trace/enumerate-6.swf |binary test/trace/enumerate-6.swf.trace | 6
2008 Nov 27
2
1-Pearson's R Distance
Hi again List, Well this time I’m writing for a friend (really J). He needs to create a distance matrix based on an abundance matrix using the 1-Pearson’s R index. Well I told him to look at the proxy package, but there is only Pearson Index. He needs it to perform a clustering. Well, as soon as he told me there proxy only had the Pearson index I thought: “He could just do something like
2009 Jun 04
1
About classifier in RWeka
Hi everyone, I have trouble to use RWeka, I tried: (w=weather dataset, all preditors are nominal) > m<-J48(play~., data=w) > e<-evaluate_Weka_classifier(m,cost = matrix(c(0,2,1,0), + ncol = 2),numFolds = 10, complexity = TRUE,seed = 123, + class = TRUE) it gives me exactly what I want, but when I tried the same classifier on the other published data: (iris dataset has all numeric
2009 Apr 30
1
stepAICc
Dear R users, Would it be difficult to change the code of stepAIC (from the MASS library) to use AICc instead of AIC? It would be great to know of someone has tried this already. Best wishes Christoph.
2006 Mar 03
1
Java related (?) problems with RWeka
Hello all, I am attempting to run an R script that makes use of RWeka. I am running SuSE Linux 9.3 with Java 1.5.0_06, R version 2.2.1, Weka 3-4-7, and Rweka 0.2-1. CLASSPATH="/usr/local/weka-3-4-7/weka.jar:/usr/local/JGR/JGR.jar" I receive the error: NewObject("weka/core/Instances","(Ljava/io/Reader;)V",...) failed Exception in thread "main"
2013 Oct 10
1
Sessión a distancia
Felipe, gracias por tu interés. La sesión quedó grabada y se colgará en breve en la página de R-es. Ya avisaremos cuando esté colgada. Un saludo, Aleix El 10 de octubre de 2013 00:01, Felipe Vargas Reeve <kaiser756@gmail.com>escribió: > Esta fue una gran iniciativa y tenía muy presente el tema relacionado a > la transmisión por internet, pero por motivos de trabajo no pude
2013 Oct 08
2
Sessión a distancia
La reunión de mañana<http://rugbcn.wordpress.com/2013/09/13/proxima-reunio-3/> del grupo de usuarios de Barcelona (RugBcn - http://rugbcn.wordpress.com/2013/09/13/proxima-reunio-3/) será retransmitida a través de la red. Para aquellos que estéis interesados, tenéis que conectaros a http://r-es.org/rugbcn-online, poner un “Nombre” y darle al botón “unirse”. Esperemos que os resulten
2010 Apr 08
3
blktap2: help please?
Hi guys, i''ve just installed xen 4.0. Since always blktapctl has never worked on my dell 1950III. I even posted a bug but so far i can''t use tap:aio or similar. I thought that with version 4 this would work, but it didn''t. I still see syslog errors from blktap version 1.0.0. Today i wanted to try version 2 I found on the xen/tools source folder. I compiled the source
2011 Dec 08
1
Reference class finalize() fails with 'attempt to apply non-function'
This bug appears intermittently in R CMD check when reference classes have finalize methods. The problem is that garbage collection can be run after the methods package is no longer available. It affects (periodically) the Bioconductor AnnotationDbi package as well as packages that contain Rcpp classes. To reproduce: library(methods) a = setRefClass("A",