-
Notifications
You must be signed in to change notification settings - Fork 133
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
German transliterations in make_clean_names()
#534
Comments
@dpprdan, I understand the challenge here. The I agree that this is not working the way that I would have expected, given what is in the documentation. I think that the best fix is to revise the documentation to clarify the order that changes are applied and the subsequent limitations to the function. In the documentation, we should also clarify that while the goal is interpretability, the higher-level goal is to provide consistent and usable names in R with commonly-used tools. That implies that it gives the same answer across locales, and that the answer provided is usable on the majority of keyboards (e.g. my American keyboard doesn't have an easy way to give an umlaut, nor do Indian, Japanese, and many others while most keyboards allow for writing basic ASCII). |
@dpprdan, I've looked at this in more detail today, and your tracing of the issue is correct:
The intent of the For the documentation, I went in to add some text to clarify what happens, but then I saw that it is already there. If you look in the documentation page, it indicates "the order of operations..." (search higher in the page that you linked to). I think that your work-around of |
@billdenney Thanks. I also played around with the code and, yeah, it's complicated. FWIW I'd change the
|
Thanks for raising this @dpprdan and for investigating it @billdenney. Sounds like things are settled and I expect this conversation may be of use to future users investigating this behavior. |
make_clean_names()
(and thereforeclean_names()
as well) currently does not support"german"
transliterations
with the defaultascii = TRUE
, contrary to their documentation. I.e. anä
should becomeae
, nota
.contrast
This is because names get transliterated here
janitor/R/make_clean_names.R
Lines 108 to 116 in bb78f34
before they reach
snakecase::to_any_case()
herejanitor/R/make_clean_names.R
Lines 147 to 156 in bb78f34
I suppose one could also argue that if
ascii = FALSE
umlauts should stay umlauts? 🤷♂️I guess the former is due to the default
transliterations = "Latin-ASCII"
getting passed down tosnakecase::to_any_case()
.Wouldn’t
ascii = FALSE
imply atransliterations = NULL
overide?Session info
The text was updated successfully, but these errors were encountered: