-
Notifications
You must be signed in to change notification settings - Fork 761
Closed
Description
I have a package which sets some globals in the .onLoad function but when I try to load the package with devtools I get an error trying to reference the global variables within the .onLoad function itself.
simple example:
.onLoad <- function(lib, pkg, ...) {
XX <<- "key"
YY <<- paste(XX, "value",sep="=")
}
Produces the following error in R
$ R
> l(gmutil)
Error in paste(XX, "value", sep = "=") : object 'XX' not found
if I comment out the second line the code loads fine and XX is set in the global environment.
The package itself passes R CMD check with no errors an loads fine when installed...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels