here is a sample code :
While I run the code without the function by entering for example :
x <- 5
The code runs perfectly without any errors.
Moreover when I try to call x with a function, it seems that the different sources do not take in account the x entered while computing the function,
Does someone encounter a similar issue ?
Thank you in advance
f1 <- function(x){
try(source("~/source1.R"), silent = TRUE)
if(nresults==0){
source("~/source2.R")
source("~/source3.R")
print(results)
}
The value of x (5) is expected to be used in the 3 source files.