I'm using R 3.0.2 on Ubuntu 14. I make some heavy calculations in my code, and I tried out the "compiler" package with
compilePKGS(enable=TRUE)
enableJIT(3)
And it seems to speed up my code. Very nice!
But everytime my package enables the "compiler", I get a lot of notes like
Note: no visible binding for global variable '.Data'
or something similar with my own S4 objects (its "obj@result" in the code):
Note: no visible binding for global variable 'result'
which is, for example, part of a self-made S4 object. Adding setCompilerOptions("suppressAll", TRUE)
or setCompilerOptions("suppressUndefined", TRUE)
didn't help. When I deactivate the compiler package completely, no notes pop up at all, so this might 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)
}
Simple example produces
Note: no visible binding for global variable '.Data'
Note: no visible binding for global variable '.Data'
directly after the ClassDefinition Call