I am trying to source()
several R scripts using a for loop, as such:
script_list <- list("script1.R", "script2.R", "script3.R")
for (i in 1:length(script_list)){
try(source(script_list[[i]]))
}
However, I often find that some of the scripts have not been sourced. I therefore have two related questions: a) what errors in earlier scripts could prevent execution of later scripts? b) what function/code would allow for all of the scripts to be executed, regardless of errors in earlier scripts?