Skip to content

Commit f644a52

Browse files
dshemetovdsweber2
andauthored
Update R/new_epipredict_steps/layer_yeo_johnson.R
Co-authored-by: David Weber <[email protected]>
1 parent daa9bf1 commit f644a52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/new_epipredict_steps/layer_yeo_johnson.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ slather.layer_epi_YeoJohnson <- function(object, components, workflow, new_data,
155155
# c(".pred_ahead_1_case_rate", ".pred_ahead_7_case_rate") to
156156
# c("lambda_ahead_1_case_rate", "lambda_ahead_7_case_rate").
157157
original_outcome_cols <- str_match(col_names, ".pred_ahead_\\d+_(.*)")[, 2]
158-
if (all(original_outcome_cols %nin% names(components$mold$outcomes))) {
158+
outcomes_wout_ahead <- str_match(names(components$mold$outcomes), "ahead_\\d+_(.*)")[,2]
159+
if (all(original_outcome_cols %nin% outcomes_wout_ahead)) {
159160
cli_abort("All columns specified in `...` must be outcome columns.", call = rlang::caller_env())
160161
}
161162

0 commit comments

Comments
 (0)