-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
step_dummy: separator option for naming #183
Comments
Would the recipes::dummy_names <- function (var, lvl, ordinal = FALSE) {
if (!ordinal)
nms <- paste(var, make.names(lvl), sep = "_")
else nms <- paste0(var, names0(length(lvl), "_"))
nms
} but you could pass your own function. |
Should I close this? Does it work for you? |
Sorry, I missed this in my email. If we could access the |
I can work up a PR hopefully next week. With Jonathan at S&P this week. Also congrats on the Davis hire. He's a great add, and he'll be a big benefit to your team. |
That's simple enough; done. Yeah, Davis is great. I feel like we have 4 people instead of 2.5. |
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. |
Max,
Loving working with this package. One thing I run into from time to time is to associate the dummy variable with the original variable name. It might make things easier if you include a separator option similar to
stringr::str_c(sep = "_")
for thestep_dummy()
function.It would make it easy to
str_split()
the base name from the appended dummy piece of the name.Let me know if you agree.
Thanks, Matt
The text was updated successfully, but these errors were encountered: