joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
567 stars 187 forks source link

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘tax_table’ for signature ‘"list"or"matrix" #1760

Open npj06 opened 1 week ago

npj06 commented 1 week ago
截屏2024-06-26 10 02 09

sessionInfo() ### R version 4.3.3 (2024-02-29) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Sonoma 14.5

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Asia/Shanghai tzcode source: internal

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] microbiome_1.24.0 Maaslin2_1.16.0 vegan_2.6-6.1
[4] lattice_0.22-6 permute_0.9-7 ggpubr_0.6.0
[7] lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1
[10] dplyr_1.1.4 purrr_1.0.2 readr_2.1.5
[13] tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.1
[16] tidyverse_2.0.0 remotes_2.5.0 MicrobiotaProcess_1.14.1 ### [19] phyloseq_1.48.0

截屏2024-06-26 10 02 43

### When I want to export the tax_table, I cannot use the tax_table() function, which results in me having to extract the tax_table only by using phylum2@tax_table.

image

### "The code cannot run correctly when my table is a matrix." image

### "I tried to transform my data into a dataframe, but I still encountered errors." image

### "How can I fix this? I need help from an expert, thank you very much."