From 914503ece6c23b97e88db9812fa7e1aa6b1c02c8 Mon Sep 17 00:00:00 2001 From: edwardlavender Date: Thu, 24 Oct 2024 10:25:55 +0200 Subject: [PATCH] Add check for file --- src/residency.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/residency.R b/src/residency.R index 3d24620..cb5a953 100644 --- a/src/residency.R +++ b/src/residency.R @@ -9,6 +9,9 @@ if (Sys.info()["nodename"] != "siam-linux20") { path <- paths[sim_id == id, ] smo <- qs::qread(here_output("particles", glue("smo-{id}.qs"))) + if (!file.exists(smo)) { + return(NULL) + } #### True residency in each region path_res <-