Skip to content

Commit 41a9833

Browse files
committed
use deprecate_stop() for new_dat in predict.censoring_model_reverse_km()
1 parent 65e77bd commit 41a9833

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

R/survival-censoring-model.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ predict.censoring_model <- function(object, ...) {
6161
}
6262

6363
#' @export
64-
predict.censoring_model_reverse_km <- function(object, time, as_vector = FALSE, ...) {
64+
predict.censoring_model_reverse_km <- function(object, new_data, time, as_vector = FALSE, ...) {
6565
rlang::check_installed("prodlim", version = "2022.10.13")
6666
rlang::check_installed("censored", version = "0.1.1.9002")
6767

68-
if ("new_data" %in% names(list(...))) {
69-
cli::cli_warn(
70-
"{.arg new_data} is ignored when predicting on \\
71-
{.fn censoring_model_reverse_km} models as it doesn't affect the result."
68+
if (lifecycle::is_present(new_data)) {
69+
lifecycle::deprecate_stop(
70+
"1.2.0",
71+
"predict.censoring_model_reverse_km(new_data)"
7272
)
7373
}
7474

0 commit comments

Comments
 (0)