-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve warnings #453
base: master
Are you sure you want to change the base?
Improve warnings #453
Conversation
@@ -329,6 +329,12 @@ naomi_model_frame <- function(area_merged, | |||
## of a Spectrum file and then calibrated. Currently no way to know if areas | |||
## comparise only part of a Spectrum file, so can't address. | |||
|
|||
if(any( mf_areas[["area_id"]] %in% unique(population_agesex$area_id) == FALSE)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(any( mf_areas[["area_id"]] %in% unique(population_agesex$area_id) == FALSE)){ | |
if (!all(mf_areas[["area_id"]] %in% unique(population_agesex$area_id))) { |
@@ -329,6 +329,12 @@ naomi_model_frame <- function(area_merged, | |||
## of a Spectrum file and then calibrated. Currently no way to know if areas | |||
## comparise only part of a Spectrum file, so can't address. | |||
|
|||
if(any( mf_areas[["area_id"]] %in% unique(population_agesex$area_id) == FALSE)){ | |||
stop( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a translation for this error?
@@ -1,3 +1,7 @@ | |||
# naomi 2.10.2 | |||
|
|||
* Improve warning generated when user fits model at admin level where no population data exists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Improve warning generated when user fits model at admin level where no population data exists. | |
* Improve error generated when user fits model at admin level where no population data exists. |
Generate more informative warning when user select area level to generate model estimates for which population data is not available