EcologicalTraitData / traitdataform

A package to manage and compile functional trait data into predefined templates
https://ecologicaltraitdata.github.io/traitdataform/
Other
33 stars 9 forks source link

Problems following the instructions in README #30

Closed iimog closed 5 years ago

iimog commented 6 years ago

I am trying to follow the steps in the README but stumbled over some issues. I'm running traitdataform_0.2.6 (installed when using devtools::install_github()) in:

R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: NixOS 18.03.133070.89ff9f94b67 (Impala)

As this might be a rather specific setup I'm also using an Ubuntu docker container for testing:

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04 LTS

In both instances I get the same errors. The first error encountered is:

> library(traitdataform)
> data(carabids)
Warning message:
In data(carabids) : data set 'carabids' not found

This dataset can be manually loaded via:

> source("/usr/local/lib/R/site-library/traitdataform/extdata/carabids.R")
> ls()
[1] "carabids"

Next, the creation of the thesaurus works but an error occures in a subtask of standardize():

> thesaurus <- as.thesaurus(
+        body_length = as.trait("body_length", 
+          expectedUnit = "mm", 
+          identifier = "length"
+          ), 
+        antenna_length = as.trait("antenna_length", 
+          expectedUnit = "mm", 
+          identifier = "antenna"
+          ),
+        metafemur_length = as.trait("metafemur_length", 
+          expectedUnit = "mm", 
+          identifier = "metafemur"
+          ),
+        eyewidth = as.trait("eyewidth_corr", 
+          expectedUnit = "mm", 
+          identifier = "eyewidth"
+          )
+ )
>                           
> traitdataset1 <- standardize(carabids,
+             thesaurus = thesaurus,
+             taxa = "name_correct",
+             units = "mm"
+             )
Input is taken to be a species -- trait matrix. If this is not the case, please provide parameters!
Error in taxize::get_gbifid_(resolved$matched_name2, verbose = verbose) : 
  unused argument (verbose = verbose)

Also setting verbose in standardize to any value explicitly does not help as the internal function taxize::get_gbifid_ does not seem to accept this parameter at all. At least not in the version installed.

Here is the full `sessionInfo` of the Ubuntu instance ```R > sessionInfo() R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1 locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] traitdataform_0.2.6 loaded via a namespace (and not attached): [1] Rcpp_0.12.18 xml2_1.2.0 magrittr_1.5 units_0.6-0 [5] getPass_0.2-2 ape_5.1 lattice_0.20-35 R6_2.2.2 [9] rlang_0.2.2 foreach_1.4.4 httr_1.3.1 stringr_1.3.1 [13] plyr_1.8.4 tools_3.4.4 parallel_3.4.4 bold_0.5.0 [17] grid_3.4.4 data.table_1.11.4 nlme_3.1-131 iterators_1.0.10 [21] tibble_1.4.2 httpcode_0.2.0 taxize_0.9.4 crayon_1.3.4 [25] reshape2_1.4.3 codetools_0.2-15 bitops_1.0-6 triebeard_0.3.0 [29] RCurl_1.95-4.11 curl_3.2 crul_0.6.0 stringi_1.2.4 [33] pillar_1.3.0 compiler_3.4.4 urltools_1.7.1 XML_3.98-1.16 [37] jsonlite_1.5 reshape_0.8.7 zoo_1.8-3 ```

iimog commented 6 years ago

Sorry for this long issue with multiple facets. I can split it in multiple issues if you want to.

fdschneider commented 6 years ago

Thanks for the testing. The README deserves an update here. The correct call for loading a package is via the package-specific function pulldata('carabids') (the vignette and examples in the documentation should be correct).

I'll fix the verbose = forwarding. (also mentioned in #29)

fdschneider commented 5 years ago

Argument 'verbose' has been fixed in f516bd022b0181788344fe7ec2ea973796f795b2