Description Usage Arguments Value Warnings See Also Examples
View source: R/relabel_mtg_color.R
Color values from scry_cards
come in as single
character strings (e.g. "U" for blue cards). relabel_mtg_color
converts them into human-readable text, (e.g. "Red" or "Multicolored").
1 | relabel_mtg_color(color_code)
|
color_code |
character vector (which can be of length 0) containing single letter WUBRG color codes. |
For mono-colored cards, relabel_mtg_color
returns the card's
color. Otherwise, it returns "Colorless" or "Multicolored", as appropriate.
relabel_mtg_color
treats any character vector of length >1 as a
multicolored card.
If you're using relabel_mtg_color
inside
[dplyr]mutate
, you'll need to pair it with
[purrr]map_chr
. Seevingette("using_label_functions")
.
wubrg_order
for converting the output into an ordered
factor.
1 2 | relabel_mtg_color("G")
relabel_mtg_color(c("G", "U"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.