[Rd] Bug in list subset assignment due to NAMED optimization

2013-01-08 Thread Justin Talbot
In R version 2.15.2 (2012-10-26) i386-apple-darwin9.8.0/i386 (32-bit) I get the following: > a <- list(1) > (a[[1]] <- a) [[1]] [[1]][[1]] [1] 1 but > a <- list(1) > b <- a > (a[[1]] <- a) [[1]] [1] 1 And similarly: > a <- list(x=1) > (a$x <- a) $x $x$x [1] 1 but > a <- list(x=1) > b <- a >

Re: [Rd] "Default" accessor in S4 classes

2013-01-08 Thread Chris Jewell
Okay, thanks for the input, All. I'd settled on the explicit coercion as.data.frame as well as the myObject[] syntax which makes a lot of sense. I'd also like to implement an as.double() method. However, I'm having trouble embedding this into my package. In the R file I have: setMethod("as.

[Rd] Win 32-bit, stack size problem with third party software?

2013-01-08 Thread Thiele, Jan Christoph
Dear R-developers, since R 2.15.2 I’m getting an error with my RNetLogo package. The package uses rJava and connects to the Java program NetLogo (http://ccl.northwestern.edu/netlogo/). When starting it in so-called GUI-mode, i.e.: library(RNetLogo) NLStart("C:/Program Files/NetLogo 5.0.3", g

Re: [Rd] "Default" accessor in S4 classes

2013-01-08 Thread John Chambers
To respond a little more directly to what you seem to be asking for: You would like an "automatic" conversion from your class (you don't give us its name, let's call it frameHDF for now) and "data.frame". In R (and in OOP generally) this sounds like inheritance: you want a frameHDF to be valid