Skip to content

Commit

Permalink
try to remove raster use from a function
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa committed Nov 28, 2023
1 parent 11c7395 commit ed23570
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/pops_multirun.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)]])
Expand Down

0 comments on commit ed23570

Please sign in to comment.