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 upstep_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. |

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