query | R Documentation |
query()
creates and returns a query command for a specific database
provider.
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 |
provider |
A string indicating the database provider name (case insensitive) |
constraint |
(optional) A |
clipboard |
(optional) A |
print |
(optional) A |
min_chars |
(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 |
delimiter |
(optional) A string with the delimiter used on |
enclosure |
(optional) A string indicating the type of enclosure for
keywords with special characters (like spaces) (default: |
clean_modifiers |
(optional) A |
sort |
(optional) A |
na_rm |
(optional) A |
duplicate_rm |
(optional) A |
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.
OR
operatorsquery()
will exclude " OR "
operators from character
elements in ...
.
This is made to facilitate the keyword set construction.
When using "OR"
(without spaces between words) the operator will be
interpreted as a keyword.
A string with a query for the provider indicating in provider
.
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]) # 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) # Expected
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.