-
Notifications
You must be signed in to change notification settings - Fork 1
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
remove unused race categories from legend #143
Conversation
reflects changes made which address issue 142
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.
When the code is done, please also update documentation (using the RStudio tools to do that, Ctrl + Shift + D should do the trick) and make any necessary updates to the vignettes. Thanks!
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.
And, we'll want to update the version number and note the changes in News.md
see Daniel's comments in PR #143
@dlcomeaux documentation, vignettes, and News.md have been updated accordingly. Let me know if you have any thoughts about my reply to your comment above. |
Changes based on Roxygen - not substantive
Sorry for the very long delay. This solution works, and I agree, seems more trouble than it's worth to go after a more complex solution. |
@leotorres114 this works, I will update documentation and merge. |
@EthanJantz @amcadamsCMAP question for you - this is failing in the pkgdown part of the run, with an error that I don't recognize. Are either of you familiar with what might cause this? |
@dlcomeaux it looks like the gh actions workflow file is outdated. it can't find |
Decided to try to implement Noel's first approach from Issue 142, which seems a bit more intuitive to the end user, e.g. provide which race categories are available the data and
cmap_fill_race()
/cmap_color_race()
should automatically exclude those not provided.match.call()
was used becausecmap_fill/color_race
is passing all of its arguments tomake_race_palette
, which uses that list of arguments to build the palette. ifmatch.call()
wasn't used, the arguments passed tomake_race_palette
would be unevaluatedsymbol
class (better explained here), which wouldn't allowmake_race_palette
to build a palette from the arguments passed to it. Most resources pointed to the need to usematch.call()
for this scenario, but maybe there's a better way to address this?do.call()
is just executing themake_race_palette
with a list of the arguments (names and values) provided tocmap_fill/color_race()
.To build the palette,
make_race_palette
loops through the names ofrace_palette
- if that name is included in the names of the argument listpassed
, it adds the argument list value ofpassed
as the index and hex value ofrace_palette
as the value to an empty character vector,pal
.