tidymodels / hardhat

Construct Modeling Packages
https://hardhat.tidymodels.org
Other
103 stars 17 forks source link

mold() with dots doesn't remove the LHS #65

Closed DavisVaughan closed 5 years ago

DavisVaughan commented 5 years ago
library(hardhat)

mold(Species ~ ., iris)
#> $predictors
#> # A tibble: 150 x 7
#>    Sepal.Length Sepal.Width Petal.Length Petal.Width Speciessetosa
#>           <dbl>       <dbl>        <dbl>       <dbl>         <dbl>
#>  1          5.1         3.5          1.4         0.2             1
#>  2          4.9         3            1.4         0.2             1
#>  3          4.7         3.2          1.3         0.2             1
#>  4          4.6         3.1          1.5         0.2             1
#>  5          5           3.6          1.4         0.2             1
#>  6          5.4         3.9          1.7         0.4             1
#>  7          4.6         3.4          1.4         0.3             1
#>  8          5           3.4          1.5         0.2             1
#>  9          4.4         2.9          1.4         0.2             1
#> 10          4.9         3.1          1.5         0.1             1
#> # … with 140 more rows, and 2 more variables: Speciesversicolor <dbl>,
#> #   Speciesvirginica <dbl>
#> 
#> $outcomes
#> # A tibble: 150 x 1
#>    Species
#>    <fct>  
#>  1 setosa 
#>  2 setosa 
#>  3 setosa 
#>  4 setosa 
#>  5 setosa 
#>  6 setosa 
#>  7 setosa 
#>  8 setosa 
#>  9 setosa 
#> 10 setosa 
#> # … with 140 more rows
#> 
#> $engine
#> Formula Engine: 
#>  
#> # Predictors: 5 
#>   # Outcomes: 1 
#>    Intercept: FALSE 
#>   Indicators: TRUE 
#> 
#> $extras
#> $extras$offset
#> NULL

Created on 2019-03-01 by the reprex package (v0.2.1.9000)

DavisVaughan commented 5 years ago

This is because we split the LHS and RHS into separate formulas.

github-actions[bot] commented 3 years ago

This issue 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.