KasperSkytte / ampvis2

Tools for visualising microbial community amplicon data
https://kasperskytte.github.io/ampvis2/
GNU General Public License v3.0
66 stars 23 forks source link

heatmap: errror when using normalise_by #130

Closed bernt-matthias closed 2 years ago

bernt-matthias commented 2 years ago

If I use normalise_by in the amp_heatmap function I get the following:

The dcast generic in data.table has been passed a data.frame, but data.table::dcast currently only has a method for data.tables. Please confirm your input is a data.table, with setDT(abund7) or as.data.table(abund7). If you intend to use a reshape2::dcast, try installing that package first, but do note that reshape2 is deprecated and you should be migrating your code away from using it.

Happens if I use a variable or a sample name

bernt-matthias commented 2 years ago

If I replace data.table::dcast by reshape2::dcast the code runs if I normalise_by a sample (no idea if useful .. just playing around).

But if I use a group I get

Error in `[.data.frame`(temp, , normalise_by) : 
  undefined columns selected