Skip to content

Commit 8238826

Browse files
authored
Merge pull request #454 from tidymodels/soft-deprecate-surv_reg
Soft-deprecate `surv_reg()`
2 parents 59214c9 + 1c37e4d commit 8238826

14 files changed

+77
-14
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
* A new linear SVM model `svm_linear()` is now available with the `LiblineaR` engine (#424) and the `kernlab` engine (#438), and the `LiblineaR` engine is available for `logistic_reg()` as well (#429). These models can use sparse matrices via `fit_xy()` (#447).
88

9-
* New model specification `survival_reg()` for the new mode `"censored regression"`. (#444)
9+
* New model specification `survival_reg()` for the new mode `"censored regression"` (#444). `surv_reg()` is now soft-deprecated (#448).
1010

1111
* New model specification `proportional_hazards()` for the `"censored regression"` mode (#451).
1212

R/surv_reg.R

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#' General Interface for Parametric Survival Models
22
#'
3+
#' @description
4+
#' `r lifecycle::badge("deprecated")`
5+
#'
6+
#' This function is soft-deprecated in favor of `survival_reg()` which uses the
7+
#' `"censored regression"` mode.
8+
#'
39
#' `surv_reg()` is a way to generate a _specification_ of a model
410
#' before fitting and allows the model to be created using
511
#' R. The main argument for the
@@ -51,9 +57,19 @@
5157
#' # Parameters can be represented by a placeholder:
5258
#' surv_reg(dist = varying())
5359
#'
60+
#' # ->
61+
#' show_engines("survival_reg")
62+
#'
63+
#' survival_reg()
64+
#' # Parameters can be represented by a placeholder:
65+
#' survival_reg(dist = varying())
66+
#'
67+
#' @keywords internal
5468
#' @export
5569
surv_reg <- function(mode = "regression", dist = NULL) {
5670

71+
lifecycle::deprecate_soft("0.1.6", "surv_reg()", "survival_reg()")
72+
5773
args <- list(
5874
dist = enquo(dist)
5975
)

man/figures/lifecycle-archived.svg

Lines changed: 1 addition & 0 deletions
Loading

man/figures/lifecycle-defunct.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

man/figures/lifecycle-maturing.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

man/figures/lifecycle-stable.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)