Skip to content
Prev 380 / 12125 Next

[R-pkg-devel] Visible bindings and reference classes

This is a problem in the compiler package.  Here is a way to reproduce it:

def <- quote(Config <- setRefClass("Config",
    fields = list(
        ConfigString = "character"),
    methods = list(
        # Constructor
        initialize = function() {
            ConfigString <<- "Hello, World!"
        })
))
dput(def, file= (tf <- tempfile()))
compiler::cmpfile(tf)
#Note: no visible binding for '<<-' assignment to 'ConfigString'
saving to file
#"C:\Users\wdunlap\AppData\Local\Temp\Rtmpk91qvT\file26d447c45b81.Rc" ...
done




Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Tue, Aug 11, 2015 at 4:24 AM, Martin Maechler <maechler at stat.math.ethz.ch