You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RStudio Edition : Desktop
RStudio Version : 1.2.1335
OS Version : Windows Server 2016 Standard
R Version : 3.5.0
Steps to reproduce the problem
Save this code in functions.R
customFunction <- function(first, second) {
first + second
}
customFunction2 <- function(first, second) {
first + second + d
}
Run this code as a separate job
a <- c(1,2)
b <- c(3,4)
d <- c(100, 100)
source('functions.R')
xx <- customFunction(a, b)
yy <- customFunction2(a, b)
Describe the problem in detail
The job fails with error message:
Error in customFunction2(a, b) : object 'd' not found
Calls: sourceWithProgress -> eval -> eval -> customFunction2
Execution halted
Describe the behavior you expected
I expected the job to run without errors. I suppose the problem is within the fact that
Object d is not a parameter of function customFunction2();
Functions are sourced from different .R file.
I understand that not defining d as a parameter in function is not the correct way of programming, but the question is if this is the way that Jobs are supposed to work?
The text was updated successfully, but these errors were encountered:
System details
Steps to reproduce the problem
functions.R
Describe the problem in detail
The job fails with error message:
Describe the behavior you expected
I expected the job to run without errors. I suppose the problem is within the fact that
d
is not a parameter of functioncustomFunction2()
;.R
file.I understand that not defining
d
as a parameter in function is not the correct way of programming, but the question is if this is the way that Jobs are supposed to work?The text was updated successfully, but these errors were encountered: