I'm trying to run a script as a local job. In the script, I call a function that has a structure
afunc <- function(localData){
print(nrow(globalData))
....
}
where globalData is a variable in the global scope. This works fine in the console, or when just sourcing the script. This errors when using a local job.
Any ideas? Is this just terrible practice on my side?
Thanks!