Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Jul 2, 2024
1 parent d523e53 commit 24d7252
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions R/checkers.R
Original file line number Diff line number Diff line change
Expand Up @@ -289,21 +289,17 @@
))
}
if (!rlang::is_lgl_na(onset_to_hosp_eval) &&
!rlang::is_lgl_na(onset_to_death_eval)) {
if (is.null(hosp_death_risk)) {
msg <- c(msg, paste(
"hosp_death_risk is set to NULL but onset_to_hosp and onset_to_death",
"is specified \n set hosp_death_risk to numeric value"
))
}
!rlang::is_lgl_na(onset_to_death_eval) && is.null(hosp_death_risk)) {
msg <- c(msg, paste(
"hosp_death_risk is set to NULL but onset_to_hosp and onset_to_death",
"is specified \n set hosp_death_risk to numeric value"
))
}
if (!rlang::is_lgl_na(onset_to_death_eval)) {
if (is.null(non_hosp_death_risk)) {
msg <- c(msg, paste(
"non_hosp_death_risk is set to NULL but onset_to_death is specified \n",
"set non_hosp_death_risk to numeric value"
))
}
if (!rlang::is_lgl_na(onset_to_death_eval) && is.null(non_hosp_death_risk)) {
msg <- c(msg, paste(
"non_hosp_death_risk is set to NULL but onset_to_death is specified \n",
"set non_hosp_death_risk to numeric value"
))
}
if (length(msg) > 0) {
stop(
Expand Down

0 comments on commit 24d7252

Please sign in to comment.