diff --git a/R/weights-utils.R b/R/weights-utils.R index 369abcf..2750022 100644 --- a/R/weights-utils.R +++ b/R/weights-utils.R @@ -46,7 +46,7 @@ detect_exposure_type <- function(.exposure) { "continuous" } - alert_info("Treating `.exposure` as {exposure_type}") + alert_info("Treating {.arg .exposure} as {exposure_type}") exposure_type } @@ -116,7 +116,7 @@ transform_exposure_binary <- function( } else { sort(unique(.exposure)) } - alert_info("Setting focal level to {.var {levels[[2]]}}") + alert_info("Setting focal level to {.val {levels[[2]]}}") return(ifelse(.exposure == levels[[2]], 1, 0)) } else { abort( diff --git a/man/wt_ate.Rd b/man/wt_ate.Rd index b8a6969..566f13d 100644 --- a/man/wt_ate.Rd +++ b/man/wt_ate.Rd @@ -400,7 +400,7 @@ weights_att <- wt_att(propensity_scores, treatment) weights_atu <- wt_atu(propensity_scores, treatment) # With explicit focal and reference levels -weights_att_explicit <- wt_att(propensity_scores, treatment, +weights_att_explicit <- wt_att(propensity_scores, treatment, .focal_level = 1, .reference_level = 0) weights_atm <- wt_atm(propensity_scores, treatment) weights_ato <- wt_ato(propensity_scores, treatment) diff --git a/tests/testthat/test-weights.R b/tests/testthat/test-weights.R index 5aab886..794de7e 100644 --- a/tests/testthat/test-weights.R +++ b/tests/testthat/test-weights.R @@ -290,7 +290,7 @@ test_that("ATE works for binary cases", { exposure_type = "binary", .exposure = .exposure ), - "Setting focal level to `treated`" + "Setting focal level to" ) expect_identical(weights, weights5) @@ -713,7 +713,7 @@ test_that("wt_entropy works for binary cases", { exposure_type = "binary", .exposure = .exposure ), - "Setting focal level to `treated`" + "Setting focal level to" ) expect_identical(weights, weights5)