Closed mikemc closed 3 years ago
Could also be nice to have a mutate_sample_data()
function that allows using dplyr::mutate()
as the backend. Implementation should be straightforward once the new as_tibble()
methods are implemented,
function(ps, ...) {
sample_data(ps) %>%
as_tibble %>%
mutate(...) %>%
sample_data
}
The ps_mutate()
function in the new microViz package provides this behavior
Also, we have mutate_sample_data()
as of 7a77af1 to give dplyr mutate functionality in speedyseq, and I don't see a need for a base-R version
Example use:
All the function will do is pass
...
tobase::transform(sample_data(physeq), ...)
and update the sample_data with the results.