-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize parameters across functions #723
Comments
I like the idea but wonder whether something like sci_ver_id could be annoying since it is long. Some naive thoughts. An alternative would be to have as many parameters as possible input: sci for sci names and ver for vernacular names within the same function (and you could only provide one of them, Not both a value for sci and a value for ver within a function call). Then the first argument could be called search and would accept all the names the function accepts, but its name wouldn't provide clarity. Are there cases where people would feed a vector of both vernacular and scientific names to the function? In a case where more than 50% of results are NA could the function message "many queries had no results, make sure you used the right input, refer to blabla vignette" 🤔 Your case reminds me a bit of https://r-hub.github.io/pkgsearch/reference/advanced_search.html where the user enters either named terms or a query string. |
thanks @maelle ! You're right that
No, only one or the other.
It could, but the search results are beyond my control - and I don't want to throw more messages, though that's a good idea to document more why users get results they get from different data sources. Thanks for link to rhub fxn. I can see now that makes sense in that context. |
I don't understand this, can you explain to me what the input is in this case? |
some functions can accept a taxonomic id or name - so |
updated docs of these functions and fixed their tests started a new man file taxize-params with informaiton on standardized parameters
updated tests for all changed functions
updated docs of these functions and fixed their tests started a new man file taxize-params with informaiton on standardized parameters
updated tests for all changed functions
the same types of inputs to functions are sometimes specified with different function param names. we should standarize them where possible. here's the candidates:
---
: stays the samenew param names are:
sci
: scientific namecom
: common nameid
: name identifiersci_com
: scientific name or common namesci_id
: scientific name or name identifierget functions
get_uid
modifier
param toggles whichget_tsn
searchtype
param toggles whichget_boldid
get_eolid
get_tpsid
get_gbifid
get_tolid
get_iucn
get_natservid
get_nbnid
get_pow
get_wiki
get_wormsid
get_ids
get_colid
search functions
bold_search
col_search
eol_search
gni_search
nbn_search
tp_search
vascan_search
pow_search
high level functions
classification
children
downstream
upstream
lowest_common
tax_name
tax_rank
id2name
sci2comm
comm2sci
synonyms
resolve
downstream functions
downstream
worms_downstream
ncbi_downstream
itis_downstream
gbif_downstream
bold_downstream
resolve functions
resolve
gnr_resolve
iplant_resolve
tnrs
The text was updated successfully, but these errors were encountered: