Reprex below; instead of using the as_tibble method for the 'sample_data' class, the default method for as_tibble as defined in the tibble package is being called.
library(phyloseqpp)
#> Loading required package: phyloseq
#> Loading required package: speedyseq
#>
#> Attaching package: 'speedyseq'
#> The following objects are masked from 'package:phyloseq':
#>
#> plot_bar, plot_heatmap, plot_tree, psmelt, tax_glom
#>
#> Attaching package: 'phyloseqpp'
#> The following objects are masked from 'package:phyloseq':
#>
#> filter_taxa, transform_sample_counts
library(tibble)
#>
#> Attaching package: 'tibble'
#> The following object is masked from 'package:phyloseqpp':
#>
#> as_tibble
data(GlobalPatterns)
sample_data(GlobalPatterns) %>% head %>% as_tibble
#> Warning in class(x) <- c(subclass, tibble_class): Setting class(x) to
#> multiple strings ("tbl_df", "tbl", ...); result will no longer be an S4
#> object
#> # A tibble: 6 x 7
#> X.SampleID Primer Final_Barcode Barcode_truncat… Barcode_full_le…
#> <fct> <fct> <fct> <fct> <fct>
#> 1 CL3 ILBC_… AACGCA TGCGTT CTAGCGTGCGT
#> 2 CC1 ILBC_… AACTCG CGAGTT CATCGACGAGT
#> 3 SV1 ILBC_… AACTGT ACAGTT GTACGCACAGT
#> 4 M31Fcsw ILBC_… AAGAGA TCTCTT TCGACATCTCT
#> 5 M11Fcsw ILBC_… AAGCTG CAGCTT CGACTGCAGCT
#> 6 M31Plmr ILBC_… AATCGT ACGATT CGAGTCACGAT
#> # … with 2 more variables: SampleType <fct>, Description <fct>
Reprex below; instead of using the as_tibble method for the 'sample_data' class, the default method for as_tibble as defined in the tibble package is being called.