ampvis2 icon indicating copy to clipboard operation
ampvis2 copied to clipboard

Problems plotting functions in amp_heatmap when aggregating on species-level

Open SofieZacho opened this issue 6 months ago • 0 comments

I have troubles plotting functions in amp_heatmap when setting tax_aggregate = 'Species' as shown in example below:

amp_heatmap(data,
            group_by = 'SampleSite',
            normalise = F,
            tax_aggregate = 'Species',
            tax_add = c("Genus"),
            tax_empty = 'remove',
            plot_functions = T)

I am getting the following error:

Error in `levels<-`(`*tmp*`, value = as.character(levels)) : 
  factor level [18] is duplicated

It is working completely fine when using tax_aggregate = 'Genus'. I can also make a text map (textmap=T) and get the function information when aggregating at species-level.

Thanks, Kasper!

SofieZacho avatar Dec 13 '23 08:12 SofieZacho