filter_nhp {filterNHP} | R Documentation |
Format non-human primate search terms for use in databases
Description
Function will return search terms for all taxa below the specified taxonomic level. Search terms for humans are always omitted, even if they are part of that taxonomic group.
Usage
filter_nhp(
source = "PubMed",
taxa = "nonhuman_primates",
omit = NULL,
simplify = TRUE
)
Arguments
source |
A string indicating which bibliographic source search terms should be formatted for. Current options are "PubMed" (default), "PsycInfo" or "WebOfScience". |
taxa |
A character vector of primate taxa. If |
omit |
An optional character vector of primate taxonomic groups that occur within taxa to omit from the search terms. This is useful for example when you need search terms for all species of one family except one genus. |
simplify |
Logical. Should printed output be simplified? |
Details
If simplify = TRUE
(default), then function will print search
terms to the console that can be directly copy-pasted into the relevant
bibliographic source as is. However, the object returned is NULL
. If
simplify = FALSE
, then function returns a character vector of length
== 1. This may be useful if the user wants to assign the output to an r
object for further manipulation.
Value
NULL
or a string of search terms that are associated with the
specified taxa, formatted for use in the specified bibliographic source.
Examples
filter_nhp(source = "PsycInfo", taxa = "papio")
filter_nhp(source = "PsycInfo", taxa = "hominidae")
filter_nhp(source = "PubMed", taxa = "cercopithecidae", omit = c("papio", "macaca"))
filter_nhp(source = "PubMed", taxa = "platyrrhini", omit = "aotus")