Closed Alectoria closed 8 years ago
Thanks for reporting this. TR8 works only with complete "Genus+species" names; the reason for the mentioned inconsistent behavior is due not to Biolflor or TR8, but to the fact that Bioflor names are checked using the taxize package: for Crepis genus there are multiple Biolflor names which are matched by taxize ("mathedname" in taxize terminology) only at the Genus level, thus the tr8() function attempts (without success) to get data from multiple entries: but does not know how to handle that, so the mentioned Error is raised. For Abies genus there is only one species in Biolflor (A. alba), thus tr8() tries to get data from there, and manage to include NA in the data retrieval: this is undesired side-behavior, so I'll add a "Warning" so that users will be advised to use only names at the species level. G.
OK, thanks for the explanation. I also bumped into a species+genus name that had the same issue ("Rubus bertramii"), possibly because it is matched by taxize to multiple names.
At the end, I found the following taxon names to produce this error: c("Crepis", "Equisetum", "Fragaria","Potentilla","Ranunculus","Rosa" ,"Rubia", "Rubus","Rubus bertramii", "Salix", "Viola"). Would it be possible to transform cases where multiple matches are found to "NA" or (+1 matches). This way, a process that involves a high number of taxon names would not be stopped.
Really like your package and found it very useful for my work!
The current version of the package should now behave in the suggested way (NA are used for "Genus-only" entries): for BiolFlor, only original names are used (so that any ambiguity is removed). The new version of tr8() has the optional argument "synonyms": when set to TRUE, tr8 search requested data for both the original names and potential synonyms (found using taxize). A new release (v. 0.9.14) - which corresponds to the github one - has just been uploaded to CRAN. P.S.: if you know of other tratibases which are free to use and could be "potential sources" of data for TR8, please let me know.
Thanks @GioBo! Your package was very helpful, even with this minor bug. Looking forward to trying out the new version.
The tr8() function produces an error rather than assigning NA when running these lines:
In both cases, I get "Error in if (.Object@url == "not present") { : argument is of length zero"
I thought that single-names could be a problem but this works well:
Working with v. 0.9.13.