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
clean_names should support 'none' as a case option #269
Comments
Great catch. Yes, "none" should be supported as you note it is supposed to
be. I would welcome a PR, thank you. If you're up for it could you
include unit tests and update the NEWS.md in your PR?
…On Wed, Feb 13, 2019 at 11:17 AM Andrew Barros ***@***.***> wrote:
The documentation for clean_names states:
"parsed", "mixed", "none", "internal_parsing": less-common cases offered
by snakecase::to_any_case. See to_any_case for details.
but the arguments in the function signature are
function (dat, case = c("snake", "lower_camel", "upper_camel",
"screaming_snake", "lower_upper", "upper_lower", "all_caps", "small_camel",
"big_camel", "old_janitor", "parsed", "mixed")) { case <- match.arg(case)
...
This makes calls with case = 'none' throw an error.
Reprex:
janitor::clean_names(mtcars, case = 'none')#> Error in match.arg(case): 'arg' should be one of "snake", "lower_camel", "upper_camel", "screaming_snake", "lower_upper", "upper_lower", "all_caps", "small_camel", "big_camel", "old_janitor", "parsed", "mixed"
It's a rare case but I'd like to use the clean_names functionality for
removing problematic characters but not touch the case.
I have a PR prepared if this is reasonable.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#269>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHOBkACD4EYHLSR1wReKzHI3WrtKQhRwks5vNDqigaJpZM4a5wd9>
.
|
andrewbarros
pushed a commit
to andrewbarros/janitor
that referenced
this issue
Feb 13, 2019
… make_names. Fixes sfirke#269
sfirke
pushed a commit
that referenced
this issue
Feb 14, 2019
…_parsing' case from docs (#270) * Add 'none' and 'internal_parsing' as options for make_clean_names and make_names. * Add 'none' and 'internal_parsing' as options for make_clean_names and make_names. Fixes #269 * - Remove documentation referencing 'internal_parsing' - Remove internal_parsing from case options for make_clean_names and clean_names
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation for clean_names states:
but the arguments in the function signature are
function (dat, case = c("snake", "lower_camel", "upper_camel", "screaming_snake", "lower_upper", "upper_lower", "all_caps", "small_camel", "big_camel", "old_janitor", "parsed", "mixed")) { case <- match.arg(case) ...
This makes calls with case = 'none' throw an error.
Reprex:
It's a rare case but I'd like to use the clean_names functionality for removing problematic characters but not touch the case.
I have a PR prepared if this is reasonable.
The text was updated successfully, but these errors were encountered: