-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add functions for checking plot labels #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
R/labels.R
Outdated
!all(vapply(args, length, integer(1)) <= 1) || | ||
!all(vapply(args[lengths(args) > 0], is.character, logical(1))) || | ||
!all(vapply(args[lengths(args) == 0], is.null, logical(1))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use rlang
or refactor this into a helper function or intermediate variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 7a5677c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Adds function
get_labels()
for listing (a subset of) the labels of a plot, anduses_labels()
for checking if labels match their expected values.Created on 2021-11-12 by the reprex package (v2.0.1)