We now consistently return a tibble with as many rows as there are outcomes in the $outcomes slot of mold(). If no outcomes are specified, a 0 column tibble is returned with as many rows are there are predictors.
If the XY method is used, y = NULL pulls the number of rows from x.
recipes juice() currently has a bug where it doesn't return the right number of rows, but that will be fixed by https://github.com/tidymodels/recipes/pull/412 and there is a failing test
library(hardhat)
mold(iris[, "Sepal.Width", drop = FALSE], y = NULL)$outcomes
#> # A tibble: 150 x 0
mold(~ Sepal.Width, iris)$outcomes
#> # A tibble: 150 x 0
rec <- recipes::recipe(iris)
mold(rec, iris)$outcomes
#> # A tibble: 0 x 0
Created on 2019-11-18 by the reprex package (v0.3.0.9000)
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
Closes #95
We now consistently return a tibble with as many rows as there are outcomes in the
$outcomes
slot ofmold()
. If no outcomes are specified, a 0 column tibble is returned with as many rows are there are predictors.If the XY method is used,
y = NULL
pulls the number of rows fromx
.recipes
juice()
currently has a bug where it doesn't return the right number of rows, but that will be fixed by https://github.com/tidymodels/recipes/pull/412 and there is a failing testCreated on 2019-11-18 by the reprex package (v0.3.0.9000)