query(
...,
provider,
constraint = NULL,
clipboard = TRUE,
print = TRUE,
min_chars = 1,
delimiter = ",",
enclosure = "double quote",
clean_modifiers = TRUE,
sort = FALSE,
na_rm = TRUE,
duplicate_rm = TRUE
)One or more character objects with keywords.
A string indicating the database provider name (case insensitive)
(optional) A character object indicating the type/types
of constraint for the query (case insensitive).
(optional) A logical value indicating if the function must
copy the output to the clipboard.
(optional) A logical value indicating if the function must
print the output on the console window.
(optional) A number indicating the minimal number of
characters a keyword must have. Keywords that don't comply to this setting
will be transformed to NA (default: 1).
(optional) A string with the delimiter used on ... values.
Use delimiter = NULL to disable this behavior (default: NULL).
(optional) A string indicating the type of enclosure for
keywords with special characters (like spaces) (default: "double quote").
(optional) A logical value indicating if keywords
with modifiers must be transformed to NA (default: TRUE).
(optional) A logical value indicating if the output must be
ordered alphabetically (default: FALSE).
(optional) A logical value indicating if NA values must be
removed from the output (default: TRUE).
(optional) A logical value indicating if duplicate
values must be removed from the output (default: TRUE).
A string with a query for the provider indicating in provider.
provider argumentquery() works with several database providers. At the moment, valid values
for the provider argument are:
"apa": for APA (American Psychology
Association).
"ebsco": for EBSCO (Elton Bryson
Stephens Company).
"embase": for Embase (Excerpta Medica
dataBASE).
"lilacs": for LILACS (Literatura
Latino-americana e do Caribe em Ciencias da Saude).
"pubmed": for PubMed.
"scielo": for SciELO (Scientific Electronic
Library Online).
"scopus": for Scopus.
"wos": for Web of Science.
constraint argumentThe constraint argument must be a character object with the exact name
of the constraint (e.g., "Title", "Abstract") that is used in the
database provider (case insensitive). Also, the following alias were included
to help the user: title, abstract, keyword.
You can see all constraint names available for the query() in
refstudio::provider_tags.
Please note that some constraints may not be available for the database you're a searching. Always read the database provider documentation before building your search.
Here are the documentation links of the database providers supported by the
query() function.
"apa": for APA (American Psychology
Association).
"ebsco": for EBSCO (Elton Bryson
Stephens Company).
"embase": for Embase (Excerpta Medica
dataBASE)
"lilacs": for
LILACS (Literatura
Latino-americana e do Caribe em Ciencias da Saude).
"pubmed": for PubMed.
"scielo": for SciELO (Scientific Electronic
Library Online).
"scopus": for Scopus.
"wos": for Web of Science.
Domains sets are a group of keyword related to a subject. You can Use the
boolean operators "AND", "NOT", and "AND NOT" between keywords in the
... argument to get a query with multiple domains. However, it's important
to note that a query can only have a fixed set of constraints.
This function was not made to produce a high level of custom programming.
Other operators (e.g., SAME, NEAR, W/n, PRE/n) are not supported.
To go around this, you can call query() several times and glue the results.
query() uses tidy_keyword() to tidy your keywords for output. See
tidy_keyword() documentation to learn more about it.
Depending on how you set up the query() arguments, it can generate empty
sets (e.g. like when you use min_chars = 100). The function will produce
an error in those cases.
Other keyword functions:
tidy_keyword()
## Creating simple queries
query("Lorem", "Ipsum, dolor", "sit", provider = "PubMed",
constraint = c("title", "abstract"), clipboard = FALSE)
#> lorem[Title/Abstract] OR ipsum[Title/Abstract] OR dolor[Title/Abstract] OR sit[Title/Abstract]
#> (lorem[Title/Abstract]) OR (ipsum[Title/Abstract]) OR
#> (dolor[Title/Abstract]) OR (sit[Title/Abstract]) # Expected
## Creating queries from multiple domains
query("Lorem", "AND", "Ipsum", "NOT", "dolor", provider = "EMBASE",
constraint = c("title", "abstract"), clipboard = FALSE)
#> (lorem:ti,ab) AND (ipsum:ti,ab) NOT (dolor:ti,ab)
#> (lorem:ti,ab) AND (ipsum:ti,ab) NOT (dolor:ti,ab) # Expected