Extends the number of subgroups shown for one particular group by adding additional colors.

extend_group(
  mdf,
  cdf,
  group_level,
  subgroup_level,
  group_name,
  existing_palette,
  new_palette,
  n_add = 5,
  light = TRUE
)

Arguments

mdf

melted data frame with microshades group processing

cdf

color data frame

group_level

string of larger taxonomic group

subgroup_level

string of smaller taxonomic group

group_name

name of the group to extend the palette for

existing_palette

name of current palette of group to extend

new_palette

name of new palette to add for extending the particular group's colors

n_add

number of colors to add

light

orientation of colors added; will make a difference if n_add is less than the number of colors in the new palette

Value

list

  • "mdf"new mdf with reclassified groups that include the group exention

  • "cdf"new cdf with reclassified groups that include the group exention

Examples


updated_objs <- extend_group(mdf, cdf, "Phylum", "Genus", "Firmicutes", "micro_purple", "micro_cvd_purple")
#> Error in filter(., group == paste(group_name, "Other", sep = "-")): object 'mdf' not found

updated_objs$mdf
#> Error in eval(expr, envir, enclos): object 'updated_objs' not found
updated_objs$cdf
#> Error in eval(expr, envir, enclos): object 'updated_objs' not found