-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Labels
Description
In the spirit of breaking changes for the next version...
For example:
library(recipes)
#> Loading required package: dplyr
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
#>
#> Attaching package: 'recipes'
#> The following object is masked from 'package:stats':
#>
#> step
recipe(Sepal.Length ~ ., data = iris) %>%
summary()
#> # A tibble: 5 x 4
#> variable type role source
#> <chr> <chr> <chr> <chr>
#> 1 Sepal.Width numeric predictor original
#> 2 Petal.Length numeric predictor original
#> 3 Petal.Width numeric predictor original
#> 4 Species nominal predictor original
#> 5 Sepal.Length numeric outcome originalCreated on 2018-10-08 by the reprex package (v0.2.1)
There are certainly occasions where a column can play more than one role.
We also might want to have more granular type attributes. For example, should a date field have types of "numeric" and "date"?
This would affect the functionality of add_role and we might need an additional change_role since the former should append and the latter should reset.