I ran across an issue using classification() in R markdown when multiple UIDs are found or a taxon. In my example, three UIDs are found for the taxon 'Ctenophora' and I am asked to enter the row number of the taxon I wish to choose. However, in R markdown the list of options do not show in the Console, so I unable to assess which is most appropriate. If I run the exact same code in a regular R script file the options do show up. Has this happened with others?
Code run:
classification(spnames, db = "ncbi", verbose = FALSE)
##########
Console output when run in R markdown:
Retrieving data for taxon 'Ctenophora'
More than one UID found for taxon 'Ctenophora'!
Enter rownumber of taxon (other inputs will return 'NA'):
1:
##########
Console output when run in a plain R script:
Retrieving data for taxon 'Ctenophora'
More than one UID found for taxon 'Ctenophora'!
Enter rownumber of taxon (other inputs will return 'NA'):
status rank division scientificname commonname uid genus species subsp modificationdate
1 active genus diatoms Ctenophora 1003038 2015/09/16 00:00
2 active genus flies Ctenophora 516519 2016/03/23 00:00
3 active phylum comb jellies Ctenophora ctenophores 10197 2017/06/14 00:00
1:
Hello,
I ran across an issue using classification() in R markdown when multiple UIDs are found or a taxon. In my example, three UIDs are found for the taxon 'Ctenophora' and I am asked to enter the row number of the taxon I wish to choose. However, in R markdown the list of options do not show in the Console, so I unable to assess which is most appropriate. If I run the exact same code in a regular R script file the options do show up. Has this happened with others?
Code run:
########## Console output when run in R markdown:
########## Console output when run in a plain R script:
Session Info
```r > sessionInfo() R version 4.3.0 (2023-04-21) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.1 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: America/Los_Angeles tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] wesanderson_0.3.7 ggbump_0.1.0 osmdata_0.2.5 geosphere_1.5-18 sf_1.0-14 taxize_0.9.100 ggstar_1.0.4 tidytree_0.4.4 [9] treeio_1.24.3 ggnewscale_0.4.9 cowplot_1.1.1 gridExtra_2.3 mvnormalTest_1.0.0 rstatix_0.7.2 MASS_7.3-60 ggtreeExtra_1.10.0 [17] ggtree_3.8.2 ape_5.7-1 reshape2_1.4.4 mapview_2.11.0 ggmap_3.0.2 mapdata_2.3.1 maps_3.4.1 metacoder_0.3.6 [25] taxa_0.4.2 vctrs_0.6.3 phyloseq_1.44.0 forcats_1.0.0 stringr_1.5.0 purrr_1.0.1 tidyr_1.3.0 tibble_3.2.1 [33] tidyverse_2.0.0 RColorBrewer_1.1-3 viridis_0.6.4 viridisLite_0.4.2 magrittr_2.0.3 ggthemes_4.2.4 dplyr_1.1.2 ggalt_0.4.0 [41] ggpubr_0.6.0 ggplot2_3.4.2 vegan_2.6-4 lattice_0.21-8 permute_0.9-7 lubridate_1.9.2 readr_2.1.4 qiime2R_0.99.6 loaded via a namespace (and not attached): [1] bitops_1.0-7 bold_1.3.0 httr_1.4.6 webshot_0.5.5 ash_1.0-15 numDeriv_2016.8-1.1 [7] tools_4.3.0 backports_1.4.1 utf8_1.2.3 R6_2.5.1 DT_0.28 lazyeval_0.2.2 [13] mgcv_1.9-0 nortest_1.0-4 rhdf5filters_1.12.1 withr_2.5.0 sp_2.0-0 leaflet_2.1.2 [19] leafem_0.2.0 cli_3.6.1 Biobase_2.60.0 textshaping_0.3.6 pspline_1.0-19 pacman_0.5.1 [25] labeling_0.4.2 mvtnorm_1.2-4 proxy_0.4-27 systemfonts_1.0.4 yulab.utils_0.0.6 foreign_0.8-84 [31] svglite_2.1.1 rstudioapi_0.15.0 httpcode_0.3.0 generics_0.1.3 gridGraphics_0.5-1 crosstalk_1.2.0 [37] vroom_1.6.3 car_3.1-2 Matrix_1.6-0 biomformat_1.28.0 fansi_1.0.4 S4Vectors_0.38.1 [43] abind_1.4-5 terra_1.7-39 lifecycle_1.0.3 yaml_2.3.7 carData_3.0-5 rhdf5_2.44.0 [49] grid_4.3.0 crayon_1.5.2 conditionz_0.1.0 pillar_1.9.0 knitr_1.43 codetools_0.2-19 [55] fastmatch_1.1-3 glue_1.6.2 ggfun_0.1.1 data.table_1.14.8 urltools_1.7.3 png_0.1-8 [61] gtable_0.3.3 rerddap_1.0.4 xfun_0.39 pcaPP_2.0-4 survival_3.5-5 ncdf4_1.21 [67] iterators_1.0.14 units_0.8-2 ellipsis_0.3.2 brew_1.0-8 nlme_3.1-162 satellite_1.0.4 [73] bit64_4.0.5 GenomeInfoDb_1.36.1 KernSmooth_2.23-22 rpart_4.1.19 colorspace_2.1-0 BiocGenerics_0.46.0 [79] DBI_1.1.3 Hmisc_5.1-0 raster_3.6-23 nnet_7.3-19 ade4_1.7-22 NADA_1.6-1.1 [85] phangorn_2.11.1 processx_3.8.2 tidyselect_1.2.0 moments_0.14.1 bit_4.0.5 compiler_4.3.0 [91] extrafontdb_1.0 curl_5.0.1 httr2_0.2.3 htmlTable_2.4.1 xml2_1.3.5 plotly_4.10.2 [97] triebeard_0.4.1 checkmate_2.2.0 scales_1.2.1 proj4_1.0-12 classInt_0.4-9 quadprog_1.5-8 [103] callr_3.7.3 rappdirs_0.3.3 digest_0.6.33 rmarkdown_2.23 XVector_0.40.0 htmltools_0.5.5 [109] pkgconfig_2.0.3 jpeg_0.1-10 base64enc_0.1-3 extrafont_0.19 stabledist_0.7-1 fastmap_1.1.1 [115] ADGofTest_0.3 rlang_1.1.1 htmlwidgets_1.6.2 zCompositions_1.4.0-1 farver_2.1.1 zoo_1.8-12 [121] jsonlite_1.8.7 RCurl_1.98-1.12 Formula_1.2-5 GenomeInfoDbData_1.2.10 ggplotify_0.1.1 patchwork_1.1.2 [127] Rhdf5lib_1.22.0 munsell_0.5.0 Rcpp_1.0.11 stringi_1.7.12 zlibbioc_1.46.0 plyr_1.8.8 [133] parallel_4.3.0 Biostrings_2.68.1 splines_4.3.0 multtest_2.56.0 hms_1.1.3 leafpop_0.1.0 [139] ps_1.7.5 uuid_1.1-0 igraph_1.5.0.1 ggsignif_0.6.4 stats4_4.3.0 crul_1.4.0 [145] evaluate_0.21 leaflet.providers_1.9.0 hoardr_0.5.3 tzdb_0.4.0 foreach_1.5.2 RgoogleMaps_1.4.5.3 [151] Rttf2pt1_1.3.12 broom_1.0.5 e1071_1.7-13 class_7.3-22 ragg_1.2.5 gsl_2.1-8 [157] copula_1.1-3 truncnorm_1.0-9 aplot_0.1.10 IRanges_2.34.1 cluster_2.1.4 timechange_0.2.0 ```