R/color_mapping_functions.R
match_cdf.Rd
Now both melted dataframes will contain the same color mapping information. This can be useful if you want to make sure that different graphs have consistent legends
match_cdf(
mdf,
df_match,
df_is_mdf = TRUE,
group_level = "Phylum",
subgroup_level = "Genus"
)
data.frame, melted data frame to apply legend to
data.frame, data frame to use legend from
logical, true if df_match is a mdf, false if df_match is a cdf
string of larger taxonomic group
string of smaller taxonomic group
data.frame, melted df with ordered factor that are consistent with the legend
mdf_to_plot <- match_cdf(mdf, df_match)
#> Error in eval(expr, envir, enclos): object 'mdf' not found