Skip to content

Commit 42d0cf5

Browse files
error if eval_time is needed and missing when calling augment() (#991)
* error if `eval_time` is needed and missing when calling augment() * bump version for extratests --------- Co-authored-by: Hannah Frick <hannah@rstudio.com>
1 parent 34f8846 commit 42d0cf5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: parsnip
22
Title: A Common API to Modeling and Analysis Functions
3-
Version: 1.1.0.9003
3+
Version: 1.1.0.9004
44
Authors@R: c(
55
person("Max", "Kuhn", , "max@posit.co", role = c("aut", "cre")),
66
person("Davis", "Vaughan", , "davis@posit.co", role = "aut"),

R/augment.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ augment_censored <- function(x, new_data, eval_time = NULL) {
127127
}
128128

129129
if (spec_has_pred_type(x, "survival")) {
130+
if (is.null(eval_time)) {
131+
rlang::abort(
132+
"The `eval_time` argument is missing, with no default.",
133+
call = caller_env()
134+
)
135+
}
130136
.filter_eval_time(eval_time)
131137
ret <- dplyr::bind_cols(
132138
predict(x, new_data = new_data, type = "survival", eval_time = eval_time),

0 commit comments

Comments
 (0)