Open bernt-matthias opened 10 months ago
Hi. It uses the values in the variable supplied to group_by
. So fx group by Plant
, then supply normalise_by = "Aalborg West"
should work. Could adjust docs if it's unclear.
Just tried
> data("AalborgWWTPs")
> amp_heatmap(AalborgWWTPs, normalise=T, normalise_by = "Aalborg West")
Error: Aalborg West is not found among group names, cannot normalise
Like this, but a different error. It's rarely used, but should be a quick fix.
library("ampvis2")
#> Loading required package: ggplot2
amp_heatmap(
AalborgWWTPs,
group_by = "Plant",
tax_aggregate = "Genus",
normalise_by = "Aalborg West"
)
#> Error in normalise_by %chin% unique(abund7$.Group): table is type 'integer' (must be 'character' or NULL)
Created on 2024-01-23 with reprex v2.1.0
I see. Combining group_by
and normalise_by
seems to make sense. At least I would have an intuition what happens in the normalisation.
According to the docs I can
If I do
I get:
Error: Plant is not found among group names, cannot normalise
I debugged this a bit, and it seems that normalisation is only possible by a sample at the moment.
Note, For me it would be fine to fix the docs.