Skip to content

ggplotly() failed when labels or title were a factor, because nchar()… #1773

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

Merged
merged 2 commits into from
May 19, 2020
Merged

ggplotly() failed when labels or title were a factor, because nchar()… #1773

merged 2 commits into from
May 19, 2020

Conversation

dmurdoch
Copy link
Contributor

… doesn't like factors. This PR adds nchar0(), which converts its argument to character before counting chars, and fixes #1772.

@cpsievert
Copy link
Collaborator

Thanks! It'd be great to account for factors as well as zero length input (see #1731). Would you mind modifying nchar0() to account for that case as well (and give it a more suitable name)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conversion of discrete labels fails if they come from a factor
2 participants