I am currently attempting to run data extraction on an HPC cluster, which means I do not have the hand on the R version or on the packages versions that are installed.
I unfortunately deal with the following issue with the terra
package: https://github.com/rspatial/terra/issues/837 . To make it short, the function runs fine, I get back the output of the function, but it still throws an error even though it shouldn't, and this stops completely my runs on the HPC.
Therefore, I need quick way to force R to still continue the execution of my script. Given the very specific error I'm facing, wrapping my function call into try()
does not solve the issue (hence, the solution here does not work for me: R Script - How to Continue Code Execution on Error), and my script still stops, so I cannot use that. Ideally, I am looking to call options()
at the beginning of my script and change the right option so that errors do not stop execution anymore. I am also also aware of a similar question, but it focused on RStudio, which i am not using the HPC, so I can't base on it to solve my problem (How to make R by default not stopping when an error is encountered while running a code?)
How can I alter my script to force execution despite errors being thrown out?