{"action":"created","issue":{"url":"https://api.github.com/repos/tidymodels/recipes/issues/140","repository_url":"https://api.github.com/repos/tidymodels/recipes","labels_url":"https://api.github.com/repos/tidymodels/recipes/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/tidymodels/recipes/issues/140/comments","events_url":"https://api.github.com/repos/tidymodels/recipes/issues/140/events","html_url":"https://github.com/tidymodels/recipes/issues/140","id":310124990,"node_id":"MDU6SXNzdWUzMTAxMjQ5OTA=","number":140,"title":"step_nzv can create surprises downstream","user":{"login":"michaellevy","id":4422055,"node_id":"MDQ6VXNlcjQ0MjIwNTU=","avatar_url":"https://avatars3.githubusercontent.com/u/4422055?v=4","gravatar_id":"","url":"https://api.github.com/users/michaellevy","html_url":"https://github.com/michaellevy","followers_url":"https://api.github.com/users/michaellevy/followers","following_url":"https://api.github.com/users/michaellevy/following{/other_user}","gists_url":"https://api.github.com/users/michaellevy/gists{/gist_id}","starred_url":"https://api.github.com/users/michaellevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaellevy/subscriptions","organizations_url":"https://api.github.com/users/michaellevy/orgs","repos_url":"https://api.github.com/users/michaellevy/repos","events_url":"https://api.github.com/users/michaellevy/events{/privacy}","received_events_url":"https://api.github.com/users/michaellevy/received_events","type":"User","site_admin":false},"labels":[{"id":636177639,"node_id":"MDU6TGFiZWw2MzYxNzc2Mzk=","url":"https://api.github.com/repos/tidymodels/recipes/labels/upcoming%20release","name":"upcoming release","color":"CF5300","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-30T17:40:51Z","updated_at":"2018-10-14T20:40:11Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"When using `recipes` programmatically, we might not know what columns `step_nzv` will remove. If it removes all nominal columns and there's a step for nominals downstream, it breaks. A general solution that would make the package more flexible would be to let prepping go through even if no columns are selected, and just have the step not do anything. I'd be happy to work on that if you want.\r\n\r\n``` r\r\nlibrary(recipes)\r\nd <- data.frame(x = c(rep(\"a\", 29), 'B'), y = rnorm(30))\r\nrecipe(d, y ~ x) %>%\r\n  step_nzv(all_nominal()) %>%\r\n  step_dummy(all_nominal()) %>%\r\n  prep(d)\r\n#> Error: No variables or terms were selected.\r\n```\r\n\r\nCreated on 2018-03-30 by the [reprex package](http://reprex.tidyverse.org) (v0.2.0)."},"comment":{"url":"https://api.github.com/repos/tidymodels/recipes/issues/comments/429660505","html_url":"https://github.com/tidymodels/recipes/issues/140#issuecomment-429660505","issue_url":"https://api.github.com/repos/tidymodels/recipes/issues/140","id":429660505,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTY2MDUwNQ==","user":{"login":"topepo","id":5731043,"node_id":"MDQ6VXNlcjU3MzEwNDM=","avatar_url":"https://avatars1.githubusercontent.com/u/5731043?v=4","gravatar_id":"","url":"https://api.github.com/users/topepo","html_url":"https://github.com/topepo","followers_url":"https://api.github.com/users/topepo/followers","following_url":"https://api.github.com/users/topepo/following{/other_user}","gists_url":"https://api.github.com/users/topepo/gists{/gist_id}","starred_url":"https://api.github.com/users/topepo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topepo/subscriptions","organizations_url":"https://api.github.com/users/topepo/orgs","repos_url":"https://api.github.com/users/topepo/repos","events_url":"https://api.github.com/users/topepo/events{/privacy}","received_events_url":"https://api.github.com/users/topepo/received_events","type":"User","site_admin":false},"created_at":"2018-10-14T20:40:11Z","updated_at":"2018-10-14T20:40:11Z","author_association":"COLLABORATOR","body":"@michaellevy Any ideas other than a more informative error message? "}}
{"actor":{"display_login":"topepo"}}