On 11 February 2014 at 02:53, Kirill Müller wrote:
| Why does it seem to be necessary to load the methods package here?

"Just use littler (TM pending)".  

It (auto-)load methods automagically, thanks to Jeff Horner.  See below.

   edd@max:~$ chmod 0755 /tmp/kirill.r 
   edd@max:~$ /tmp/kirill.r 
   [1] "refObjectGenerator"
   attr(,"package")
   [1] "methods"
   edd@max:~$ cat /tmp/kirill.r 
   #!/usr/bin/r
   
   newTest <- function() {
      cl <- get("someClass")
      cl$new
   }

   someClass <- setRefClass("someClass")
   print(class(someClass))
   edd@max:~$ 

For Rscript, you still need to load it explicitly like any other packages you
want to use.

Dirk

PS New littler release pending in a few days or weeks. The Github repo is
current and working.

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to