Skip to content

Commit

Permalink
The list of dates returned in case of detection of NA in sim was not …
Browse files Browse the repository at this point in the history
…correct
  • Loading branch information
sbuis committed Apr 18, 2024
1 parent 4603053 commit ad395ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/obsSim_consistency.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ is_sim_inf_or_na <- function(sim_list, obs_list, param_values) {
var_list <- lapply(names(sim_list[[sit]]), function(x) {
if (any(is.infinite(sim_list[[sit]][!is.na(obs_list[[sit]][,x]),][[x]])) ||
any(is.na(sim_list[[sit]][!is.na(obs_list[[sit]][,x]),][[x]]))) {
return(list(sim_list[[sit]]$Date[is.infinite(sim_list[[sit]][!is.na(obs_list[[sit]][,x]),][[x]]) |
is.na(sim_list[[sit]][!is.na(obs_list[[sit]][,x]),][[x]])]))
return(list(sim_list[[sit]]$Date[(is.infinite(sim_list[[sit]][[x]] &
!is.na(obs_list[[sit]][,x]))) |
(is.na(sim_list[[sit]][[x]] &
!is.na(obs_list[[sit]][,x])))]))
} else {
return(NULL)
}
Expand Down

0 comments on commit ad395ff

Please sign in to comment.