Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`juice()` should always return the same number of rows as the template #411
Comments
|
This also makes it more consistent with dplyr suppressPackageStartupMessages(library(recipes))
rec <- recipe(~ Sepal.Width, iris) %>%
prep(iris)
# should be 150 rows
juice(rec, all_outcomes())
#> # A tibble: 0 x 0
dplyr::select(iris, dplyr::matches("x"))
#> data frame with 0 columns and 150 rowsCreated on 2019-11-18 by the reprex package (v0.3.0.9000) |
In the case of
juice()where no terms are selected, a tibble with the same number of rows as the template should be returned rather than a completely empty tibble with 0 rows and 0 columns.Created on 2019-11-18 by the reprex package (v0.3.0.9000)
This would help with tidymodels/hardhat#95 and be more consistent