Skip to content
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

argument to clean_names() for maximum length of names? #201

Closed
jrosen48 opened this issue May 14, 2018 · 2 comments
Closed

argument to clean_names() for maximum length of names? #201

jrosen48 opened this issue May 14, 2018 · 2 comments

Comments

@jrosen48
Copy link

I recently read an Excel sheet with obscenely long variable names (i.e., twenty words in length). What do you think of an argument that would shorten (or even somehow summarize) very long variable names, maybe to a max. length of, say, 10-12 characters or 2-3 words? Just an idea.

@Tazinho
Copy link
Contributor

Tazinho commented May 20, 2019

Hi @jrosen48 I am currently writing a proposal for changes regarding clean_names(). Would some kind of transliterations argument have helped to solve your issue? E.g. sth like:

to_any_case("very_supersupersupersuper_long_name",
             transliterations = c(`supersupersupersuper` = "super"))
[1] "very_super_long_name"
# or
to_any_case("un_china_france_greatbritain_russia_america",
             transliterations = c(`china` = "chi", 
                                  `france` = "fr", 
                                  `greatbritain` = "gb", 
                                  `russia` = "ru",
                                  `america` = "usa"))
[1] "un_chi_fr_gb_ru_usa"

Or do you have another option in mind?

@sfirke
Copy link
Owner

sfirke commented Mar 7, 2020

good idea thank you! My response time is even longer than your variable names 😩 This is now being discussed on #332 so I'll close it here

@sfirke sfirke closed this as completed Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants