LebeerLab / tidytacos

Functions to manipulate and visualize microbial community data
https://lebeerlab.github.io/tidytacos/
GNU General Public License v3.0
9 stars 1 forks source link

tidytacos::add_alpha() changed? #56

Closed slambrechts closed 3 months ago

slambrechts commented 3 months ago

tidytacos::add_alpha() used to add observed, but it seems this does not seem to be the case anymore? The reason I ask, is because code that used to work, doesn't seem to work anymore when I work in an environment that has a newer version of the tidytacospackage, so I get:

Quitting from lines 517-524 [unnamed-chunk-24] (mbag_data_analyse_nieuwe_metadata.Rmd)
Error in `geom_point()`:
! Problem while computing aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error:
! object 'observed' not found
slambrechts commented 3 months ago

Think I found the cause?

observed is now obs

and

tidytacos::add_alpha() does not add observed richness anymore, but tidytacos::add_alphas(methods = "all") does

TheOafidian commented 3 months ago

That's correct, I've added support for different alpha div metrics to the add_alpha() function. You can read about which ones here (I'll fix the layout of the bullet points later!).

With add_alphas() you can add a bunch of metrics in one go, for example add_alphas(methods=c("obs","invsimpson")) would add the same metrics previously added by add_alpha(), with the renaming of "observed" to "obs" as you noted.