From 537528f9fb6396caa6d23e064cbdb86224c9be28 Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Tue, 2 Jul 2024 11:22:29 +0100 Subject: [PATCH] linting --- R/checkers.R | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/R/checkers.R b/R/checkers.R index 0d18186..eb2f808 100644 --- a/R/checkers.R +++ b/R/checkers.R @@ -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(