Skip to content

Commit

Permalink
remove tailor(time) (closes #16)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Jun 5, 2024
1 parent aac6b57 commit 31ee5d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
15 changes: 3 additions & 12 deletions R/tailor.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -80,7 +78,7 @@ print.tailor <- function(x, ...) {

#' @export
fit.tailor <- function(object, .data, outcome, estimate, probabilities = c(),
time = c(), ...) {
...) {
# ------------------------------------------------------------------------------
# set columns via tidyselect

Expand All @@ -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)
Expand Down
10 changes: 1 addition & 9 deletions man/tailor.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 31ee5d8

Please sign in to comment.