create_tidytacos help page example doesn't create a usable tidytacos object, and doesn't give any guidance on how to continue.
library(tidytacos)
# example taken from create_tidytacos help page
x <- matrix(
c(1500, 1300, 280, 356),
ncol = 2
)
rownames(x) <- c("taxon1", "taxon2")
colnames(x) <- c("sample1", "sample2")
# Convert to tidytacos object
data <- create_tidytacos(x, taxa_are_columns = FALSE)
# tacoplot_stack has unstated requirements about the taxonomy table format?
data %>% tacoplot_stack()
#> Error in `mutate()`:
#> ℹ In argument: `best_classification = purrr::pmap_chr(...)`.
#> Caused by error in `ta$taxa[, rank_names]`:
#> ! Can't subset columns that don't exist.
#> ✖ Columns `kingdom`, `phylum`, `class`, `order`, `family`, etc. don't exist.
# not sure what is happening here, maybe tacoplot_ord doesn't like having only 2 samples?
data %>% tacoplot_ord(x = "sample_id")
#> Error in stats::cmdscale(dist_matrix, k = dims, eig = T, list = T, ...): 'k' must be in {1, 2, .. n - 1}
# lastly, not sure what this bit is
tidytacos("a")
#> Error in tidytacos("a"): could not find function "tidytacos"
create_tidytacos help page example doesn't create a usable tidytacos object, and doesn't give any guidance on how to continue.
Created on 2024-07-26 with reprex v2.1.1