Skip to content

Commit

Permalink
Fix to disease_dispersal
Browse files Browse the repository at this point in the history
I'm less likely to get a bug if I add in this line, so in it goes
  • Loading branch information
japilo committed May 29, 2024
1 parent d8bd88b commit 5d32f97
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions R/disease_dispersal.r
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ disease_dispersal <- function(replicates,
dispersals_change_over_time,
dispersal_data_changes,
dispersal_compact_matrix_tm,
dispersal_stages) {

dispersal_stages,
tm) {
if (dispersal_stages) {
if (tm == 1 || !dispersals_change_over_time) {
dispersal_compact_matrix_tm <- dispersal_compact_matrix
Expand All @@ -410,12 +410,13 @@ disease_dispersal <- function(replicates,
dispersal_compact_matrix_tm_list <- vector("list", n)
}

dispersal_compact_matrix_tm_list <- pmap(list(dispersal_compact_matrix_list,
dispersal_compact_matrix_tm_list <- mapply(apply_dispersal_changes,
dispersal_compact_matrix_list,
dispersals_change_over_time_list,
dispersal_data_changes_list,
dispersal_compact_matrix_tm_list,
dispersal_stages_expanded),
apply_dispersal_changes)
dispersal_stages_expanded,
replicate(n, list(tm)))

simulator$attached$dispersal_compact_matrix_tm_list <- dispersal_compact_matrix_tm_list

Expand Down

0 comments on commit 5d32f97

Please sign in to comment.