Example shown below. I think maybe we don't want to export speedyseq's as_tibble, which is only defined to handle s4 classes...but how can we get tibble's s3 as_tibble to pay attention to phyloseq's s4 classes? can we declare them as s3 classes as well?
Also, if we load tibble then speedyseq, then as_tibble(df) won't work on a plain df - to solve this problem we could perhaps just define the default method of speedyseq's as_tibble to call tibble::as_tibble.
> library(speedyseq)
Loading required package: phyloseq
Attaching package: ‘speedyseq’
The following objects are masked from ‘package:phyloseq’:
filter_taxa, plot_bar, plot_heatmap, plot_tree, psmelt, tax_glom,
tip_glom, transform_sample_counts
> library(tibble)
Attaching package: ‘tibble’
The following object is masked from ‘package:speedyseq’:
as_tibble
> data(GlobalPatterns)
> GlobalPatterns %>% as_tibble
Error in as.data.frame.default(value, stringsAsFactors = FALSE) :
cannot coerce class ‘structure("phyloseq", package = "phyloseq")’ to a data.frame
>
Example shown below. I think maybe we don't want to export speedyseq's as_tibble, which is only defined to handle s4 classes...but how can we get tibble's s3 as_tibble to pay attention to phyloseq's s4 classes? can we declare them as s3 classes as well?
Also, if we load tibble then speedyseq, then
as_tibble(df)
won't work on a plain df - to solve this problem we could perhaps just define the default method of speedyseq's as_tibble to call tibble::as_tibble.