Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

as.character.frmt_when() doesn't retain quotes on strings #455

Closed
bzkrouse opened this issue Mar 26, 2024 · 1 comment · Fixed by #469
Closed

as.character.frmt_when() doesn't retain quotes on strings #455

bzkrouse opened this issue Mar 26, 2024 · 1 comment · Fixed by #469
Labels
bug Something isn't working
Milestone

Comments

@bzkrouse
Copy link
Collaborator

frmt_when( 
  "<1"~ "<1",
  "TRUE" ~ frmt("(xx)")
) %>% 
  as.character()

returns: "frmt_when('<1' ~ <1, 'TRUE' ~ frmt('(xx)'))"

desired result: "frmt_when('<1' ~ '<1', 'TRUE' ~ frmt('(xx)'))"

@bzkrouse bzkrouse added the bug Something isn't working label Mar 26, 2024
@bzkrouse bzkrouse added this to the v0.2.0 milestone Apr 25, 2024
@bzkrouse
Copy link
Collaborator Author

also
frmt_when('==100' ~ '', '==0' ~'' , 'TRUE' ~ frmt('(xx.x %)'))
produces
frmt_when('==100' ~ , '==0' ~ , 'TRUE' ~ frmt('(xx.x %)'))

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant