
importFrom("ape", "pcoa")

importFrom("dplyr", 
           ".data", "any_of", "mutate", "pull", "rename", "select", 
           "slice", "slice_head", "slice_tail", "slice_min", "slice_max", "slice_sample",
           "filter", "relocate", "across", "everything", "left_join")

importFrom("ecodive", "list_metrics", "match_metric", "n_cpus")
importFrom("emmeans", "emmeans", "emtrends", "eff_size")
importFrom("fillpattern", "fill_pattern", "scale_fill_pattern")
importFrom("ggbeeswarm", "geom_beeswarm", "geom_quasirandom")
importFrom("ggnewscale", "new_scale_fill")
importFrom("ggplot2", "aes", "ggsave")
importFrom("ggrepel", "geom_label_repel")
importFrom("ggtext", "element_markdown", "geom_textbox")
importFrom("jsonlite", "base64_enc", "read_json", "toJSON")
importFrom("magrittr","%>%", "%<>%")
importFrom("methods", "as", "formalArgs")
importFrom("patchwork", "free", "inset_element", "wrap_plots")
importFrom("pillar", "tbl_sum", "glimpse")
importFrom("plyr", ".", "ddply", "ldply", "llply")
importFrom("readr", "read_delim")
importFrom("readxl", "read_excel")

importFrom("stats", 
           "as.formula", "median", "na.omit", "p.adjust", "runif", 
           "sd", "setNames", "t.test", "var")

importFrom("utils",
           "capture.output", "combn", "download.file", "getFromNamespace", "hasName", 
           "head", "object.size", "packageVersion", "read.table", "str", "tail", 
           "write.csv", "write.table")

importFrom("vegan", "adonis2", "metaMDS", "mrpp", "permustats")

export(`adiv_boxplot`)
export(`adiv_corrplot`)
export(`adiv_matrix`)
export(`adiv_stats`)
export(`adiv_table`)
export(`adiv_vector`)
export(`as_rbiom`)
export(`bdiv_boxplot`)
export(`bdiv_clusters`)
export(`bdiv_corrplot`)
export(`bdiv_distmat`)
export(`bdiv_heatmap`)
export(`bdiv_matrix`)
export(`bdiv_ord_plot`)
export(`bdiv_ord_table`)
export(`bdiv_stats`)
export(`bdiv_table`)
export(`bdply`)
export(`biom_inflate`)
export(`biom_merge`)
export(`biom_relativize`)
export(`biom_rescale`)
export(`blply`)
export(`convert_to_animalcules`)
export(`convert_to_biomformat`)
export(`convert_to_phyloseq`)
export(`convert_to_SE`)
export(`convert_to_TSE`)
export(`distmat_ord_table`)
export(`distmat_stats`)
export(`plot_heatmap`)
export(`rare_corrplot`)
export(`rare_multiplot`)
export(`rare_stacked`)
export(`rarefy`)
export(`read_biom`)
export(`read_fasta`)
export(`read_tree`)
export(`sample_apply`)
export(`sample_sums`)
export(`stats_boxplot`)
export(`stats_corrplot`)
export(`stats_table`)
export(`subset_taxa`)
export(`suggest_inflate_depths`)
export(`suggest_rarefy_depth`)
export(`taxa_apply`)
export(`taxa_boxplot`)
export(`taxa_clusters`)
export(`taxa_corrplot`)
export(`taxa_heatmap`)
export(`taxa_map`)
export(`taxa_matrix`)
export(`taxa_means`)
export(`taxa_stacked`)
export(`taxa_stats`)
export(`taxa_sums`)
export(`taxa_table`)
export(`tree_subset`)
export(`write_biom`)
export(`write_counts`)
export(`write_fasta`)
export(`write_metadata`)
export(`write_mothur`)
export(`write_qiime2`)
export(`write_taxonomy`)
export(`write_tree`)
export(`write_xlsx`)


# Datasets
export(babies)
export(gems)
export(hmp50)


# Deprecated functions
export(`mtx_rarefy`)
export(`mtx_percent`)
export(`mtx_rescale`)
export(`rarefy_cols`)
export(`rescale_cols`)
export(`rescale_rows`)


S3method(as_rbiom,     rbiom)
S3method(as_rbiom,     biom)
S3method(as_rbiom,     phyloseq)
S3method(as_rbiom,     SummarizedExperiment)
S3method(as_rbiom,     TreeSummarizedExperiment)
S3method(as_rbiom,     MultiAssayExperiment)
S3method(as_rbiom,     default)
S3method("[",          rbiom)
S3method(as.list,      rbiom)
S3method(as.matrix,    rbiom)
S3method(glimpse,      rbiom)
S3method(mutate,       rbiom)
S3method(na.omit,      rbiom)
S3method(pull,         rbiom)
S3method(rename,       rbiom)
S3method(subset,       rbiom)
S3method(slice,        rbiom)
S3method(slice_head,   rbiom)
S3method(slice_tail,   rbiom)
S3method(slice_min,    rbiom)
S3method(slice_max,    rbiom)
S3method(slice_sample, rbiom)
S3method(with,         rbiom)
S3method(within,       rbiom)
S3method(tbl_sum,      rbiom_tbl)
S3method("$",          rbiom_tbl)
S3method("$",          rbiom_plot)
S3method(print,        rbiom_code)

# Re-exports
export(".")
export("%>%")
export("%<>%")
export("ddply")
export("glimpse")
export("ggsave")
export("left_join")
export("ldply")
export("list_metrics")
export("llply")
export("match_metric")
export("mutate")
export("n_cpus")
export("na.omit")
export("pull")
export("relocate")
export("rename")
export("select")
export("slice")
export("slice_head")
export("slice_tail")
export("slice_min")
export("slice_max")
export("slice_sample")
