Skip to content

Commit e448e2c

Browse files
committed
changes for #1238
1 parent d2d8014 commit e448e2c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ export(discrim_flexible)
221221
export(discrim_linear)
222222
export(discrim_quad)
223223
export(discrim_regularized)
224+
export(ensure_parsnip_format)
224225
export(eval_args)
225226
export(extract_fit_engine)
226227
export(extract_fit_time)

R/predict.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ check_pred_type <- function(object, type, ..., call = rlang::caller_env()) {
271271
#' tibbles.
272272
#'
273273
#' @param x A data frame or vector (depending on the context and function).
274+
#' @param col_name A string for a prediction column name.
275+
#' @param overwrite A logical for whether to overwrite the column name.
274276
#' @return A tibble
275277
#' @keywords internal
276278
#' @name format-internals
@@ -336,6 +338,9 @@ format_hazard <- function(x) {
336338
ensure_parsnip_format(x, ".pred")
337339
}
338340

341+
#' @export
342+
#' @rdname format-internals
343+
#' @keywords internal
339344
ensure_parsnip_format <- function(x, col_name, overwrite = TRUE) {
340345
if (isTRUE(ncol(x) > 1) | is.data.frame(x)) {
341346
x <- tibble::new_tibble(x)

0 commit comments

Comments
 (0)