From 31ee5d8a28bb3afa35fead3be039a6a88954b5f3 Mon Sep 17 00:00:00 2001 From: simonpcouch Date: Wed, 5 Jun 2024 15:53:28 -0500 Subject: [PATCH] remove `tailor(time)` (closes #16) --- R/tailor.R | 15 +++------------ man/tailor.Rd | 10 +--------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/R/tailor.R b/R/tailor.R index 37e5d18..c19965a 100644 --- a/R/tailor.R +++ b/R/tailor.R @@ -9,20 +9,18 @@ #' @param probabilities The names of class probability estimates (if any). For #' classification, these should be given in the order of the factor levels of #' the `estimate`. -#' @param time The name of the predicted event time. (not yet supported) #' @examples #' #' tailor() #' @export tailor <- function(type = "unknown", outcome = NULL, estimate = NULL, - probabilities = NULL, time = NULL) { + probabilities = NULL) { columns <- list( outcome = outcome, type = type, estimate = estimate, - probabilities = probabilities, - time = time + probabilities = probabilities ) new_tailor( @@ -80,7 +78,7 @@ print.tailor <- function(x, ...) { #' @export fit.tailor <- function(object, .data, outcome, estimate, probabilities = c(), - time = c(), ...) { + ...) { # ------------------------------------------------------------------------------ # set columns via tidyselect @@ -95,13 +93,6 @@ fit.tailor <- function(object, .data, outcome, estimate, probabilities = c(), check_selection(enquo(probabilities), columns$probabilities, "probabilities") } - time <- tidyselect::eval_select(enquo(time), .data) - if (length(time) > 0) { - columns$time <- names(time) - } else { - columns$time <- character(0) - } - .data <- .data[, names(.data) %in% unlist(columns)] if (!tibble::is_tibble(.data)) { .data <- tibble::as_tibble(.data) diff --git a/man/tailor.Rd b/man/tailor.Rd index 362ebd7..2acfcee 100644 --- a/man/tailor.Rd +++ b/man/tailor.Rd @@ -4,13 +4,7 @@ \alias{tailor} \title{Declare post-processing for model predictions} \usage{ -tailor( - type = "unknown", - outcome = NULL, - estimate = NULL, - probabilities = NULL, - time = NULL -) +tailor(type = "unknown", outcome = NULL, estimate = NULL, probabilities = NULL) } \arguments{ \item{type}{The model sub-type. Possible values are \code{"unknown"}, \code{"regression"}, @@ -25,8 +19,6 @@ tidymodels, this corresponds to column names \code{.pred}, \code{.pred_class}, o \item{probabilities}{The names of class probability estimates (if any). For classification, these should be given in the order of the factor levels of the \code{estimate}.} - -\item{time}{The name of the predicted event time. (not yet supported)} } \description{ Declare post-processing for model predictions