extend_group: Extends the number of subgroups shown for one particular...

View source: R/color_mapping_functions.R

extend_groupR Documentation

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

Description

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

Usage

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")

updated_objs$mdf
updated_objs$cdf


KarstensLab/microshades documentation built on June 11, 2024, 11:41 a.m.