ropensci / taxa

taxonomic classes for R
https://docs.ropensci.org/taxa
Other
48 stars 12 forks source link

supertaxa "subset" option does not work with variables #102

Closed zachary-foster closed 6 years ago

zachary-foster commented 6 years ago
> id = "fyi"
> supertaxa(obj, id, simplify = TRUE, include_input = TRUE, value = "taxon_ids")
character(0)
> supertaxa(obj, "fyi", simplify = TRUE, include_input = TRUE, value = "taxon_ids")
 [1] "fyi" "fbl" "dki" "bwq" "axe" "akl" "ady" "abi" "aai" "aad" "aab"
> devtools::install_github("ropensci/taxa")
Skipping install of 'taxa' from a github remote, the SHA1 (1a801d7f) has not changed since last install.
  Use `force = TRUE` to force installation
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] rmarkdown_1.6        gridExtra_2.3        metacoder_0.1.3.9027 taxa_0.1.0.9111      ape_4.1              RColorBrewer_1.1-2  
 [7] reshape2_1.4.2       ggplot2_2.2.1        stringr_1.2.0        qsubmitter_0.1       knitr_1.17          

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.13     git2r_0.19.0     compiler_3.4.1   plyr_1.8.4       bindr_0.1        digest_0.6.12    memoise_1.1.0    jsonlite_1.5    
 [9] evaluate_0.10.1  tibble_1.3.4     nlme_3.1-131     gtable_0.2.0     lattice_0.20-35  mgcv_1.8-17      pkgconfig_2.0.1  rlang_0.1.2     
[17] Matrix_1.2-10    curl_3.0         yaml_2.1.14      parallel_3.4.1   bindrcpp_0.2     httr_1.3.1       withr_1.0.2      cluster_2.0.6   
[25] dplyr_0.7.4      devtools_1.13.2  ade4_1.7-6       rprojroot_1.2    grid_3.4.1       glue_1.1.1       R6_2.2.2         seqinr_3.4-5    
[33] magrittr_1.5     MASS_7.3-47      scales_0.5.0     backports_1.1.0  htmltools_0.3.6  assertthat_0.2.0 permute_0.9-4    colorspace_1.3-2
[41] stringi_1.1.5    lazyeval_0.2.0   munsell_0.4.3    vegan_2.4-3     
zachary-foster commented 6 years ago

I was not able to reproduce this with the test data:

> id = "q"
> supertaxa(ex_taxmap, id)
$q
[1] 11  6  2

Yet, if I change the id to x in my other code, it works. I figured this might be a NSE issue, but there is no other id in the environment. There is also no id in the code for supertaxa. Hmmm.....

zachary-foster commented 6 years ago

I still cant reproduce this, so I will close for now. I think I was using a taxmap object loaded from a .Rdata file, so maybe it was out of date with the package somehow?

sckott commented 6 years ago

seems like a reasonable reason