diff --git a/R/recipe.R b/R/recipe.R index e668e6607..949711521 100644 --- a/R/recipe.R +++ b/R/recipe.R @@ -209,6 +209,14 @@ recipe.formula <- function(formula, data, ...) { cli::cli_abort("{.arg data} is missing with no default.") } + if (is.table(data)) { + cli::cli_warn( + "Passing a table to {.fn recipe} is undocumented unsupported behavior. + This will no longer be possible in the next release of {.pkg recipes}." + ) + data <- as_tibble(data) + } + if (!is.data.frame(data) && !is.matrix(data) && !is_sparse_matrix(data)) { cli::cli_abort( "{.arg data} must be a data frame, matrix, or sparse matrix,