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

Quote variable names when reporting on repair #407

Closed
jennybc opened this issue May 2, 2018 · 4 comments
Closed

Quote variable names when reporting on repair #407

jennybc opened this issue May 2, 2018 · 4 comments

Comments

@jennybc
Copy link
Member

@jennybc jennybc commented May 2, 2018

When set_tidy_names() reports names affected by repair, they should be quoted in the message.

tibble::tidy_names(c("a", "", "b", "a"))
#> New names:
#> a -> a..1
#>  -> ..2
#> a -> a..4
#> [1] "a..1" "..2"  "b"    "a..4"

Created on 2018-05-02 by the reprex package (v0.2.0).

Written quickly as an aside during a meeting with @hadley, now fleshed out a bit. Let me know if I/we should expand.

@jennybc jennybc changed the title Quote the new names Quote variable names when reporting on repair May 2, 2018
@krlmlr
Copy link
Member

@krlmlr krlmlr commented Jun 6, 2018

Thanks. Do we need to quote all names, or only non-syntactic ones?

@hadley
Copy link
Member

@hadley hadley commented Aug 2, 2018

Also need to display NAs

tibble::tidy_names(c("", NA))
#> New names:
#>  -> ..1
#>  -> ..2
#> [1] "..1" "..2"

And in general, needs to encode strings:

tibble::tidy_names(c("\n", "\n"))
#> New names:
#> 
#>  -> 
#> ..1
#> 
#>  -> 
#> ..2
#> [1] "\n..1" "\n..2"
@krlmlr krlmlr closed this in 657bc65 Aug 16, 2018
@krlmlr
Copy link
Member

@krlmlr krlmlr commented Aug 16, 2018

Will add tests as part of #406.

@github-actions
Copy link

@github-actions github-actions bot commented Dec 10, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants