Skip to content

Commit 65e77bd

Browse files
committed
add warning
1 parent dfa5062 commit 65e77bd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

R/survival-censoring-model.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ predict.censoring_model_reverse_km <- function(object, 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."
72+
)
73+
}
74+
6875
res <- rep(NA_real_, length(time))
6976
if (length(time) == 0) {
7077
return(res)

0 commit comments

Comments
 (0)