I use R 3.0.2 on Ubuntu 14. I do some heavy computing in my code, and I tried the “compiler” package with
compilePKGS(enable=TRUE) enableJIT(3)
And it seems to speed up my code. Very nice!
But every time my package allows the "compiler", I get a lot of notes, for example
Note: no visible binding for global variable '.Data'
or something similar with my own S4 objects (its "obj @result" in code):
Note: no visible binding for global variable 'result'
which is, for example, part of a makeshift object S4. Adding setCompilerOptions("suppressAll", TRUE) or setCompilerOptions("suppressUndefined", TRUE) did not help. When I completely deactivate the compiler package, no notes appear at all, so this may be a problem with my understanding of the compiler-package / jit?
What can I do to suppress these notes?
Edit:
require(compiler) compilePKGS(enable=TRUE) enableJIT(3) setClass(Class = "testobject", slots = c( data = "numeric", test = "character", split = "numeric", name = "character" ) ) a <- new("testobject", data=c(1,2,3,4), test="TEST", split=5, name="NAME") for(i in a@data ){ print(i) }
A simple example gives
Note: no visible binding for global variable '.Data' Note: no visible binding for global variable '.Data'
immediately after calling ClassDefinition