Skip to content
Snippets Groups Projects
Commit 3c26259c authored by thierrychambert's avatar thierrychambert
Browse files

debug : issue of h = NA

parent 7b55aa19
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,9 @@ pop_project <- function(fatalities,
}
}
## Prevent error, when N = 0 & M = 0
if( any(is.na(h) | is.nan(h)) ) h[] <- 0
## Projection : apply the LESLIE matrix calculation forward
# Scenario 0
j=1
......
......@@ -95,8 +95,8 @@ pop_project_cumulated_impacts <- function(fatalities,
}
}
# Sample a seed for RNG
seed <- ((((Sys.time() %>% as.numeric) %% 1e10) * 1e9) %% 1e5) %>% round
## Prevent error, when N = 0 & M = 0
if( any(is.na(h) | is.nan(h)) ) h[] <- 0
## Projection : apply the LESLIE matrix calculation forward
# Scenario 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment