From ed23570d90770c1b5291ccd360f80cde848cda15 Mon Sep 17 00:00:00 2001 From: Anna Petrasova Date: Tue, 28 Nov 2023 11:59:47 -0500 Subject: [PATCH] try to remove raster use from a function --- R/pops_multirun.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pops_multirun.R b/R/pops_multirun.R index 41fa2032..96c4cb66 100644 --- a/R/pops_multirun.R +++ b/R/pops_multirun.R @@ -573,7 +573,7 @@ pops_multirun <- function(infected_file, west_distance_to_quarantine <- data.frame(t(rep(NA, length(probability_runs[[1]])))) } - which_median <- function(x) raster::which.min(abs(x - median(x))) + which_median <- function(x) which.min(abs(x - median(x))) median_run_index <- which_median(infected_number[[ncol(infected_number)]]) min_run_index <- which.min(infected_number[[ncol(infected_number)]])