create_query_strings: Create PubMed query strings

Description Usage Arguments Details Value Examples

View source: R/create_query_strings.R

Description

Create PubMed query strings for each DOI batch

Usage

1

Arguments

dois

List or character vector of DOIs. For multiple DOI batches, use a list of character vectors. For a single doi batch, use a character vector or list (of length 1) of character vectors. Generally the output of batch_dois

term

OPTIONAL. Character string of additional terms to append to each query string. Include appropriate booleans. See PubMed Help for available tags.

Details

NOTE: I understand "query string" and "search string" to be synonymous. I use "query string" for internal consistency.

Value

Character vector of length number of batches (length dois if dois is a list, else 1)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# With a single batch of DOIs as a character vector
my_dois <- c("10.3389/fpsyt.2018.00207", "10.1186/s40779-018-0166-5", "10.1186/s12959-018-0173-5", "10.1103/PhysRevD.97.096016", "10.1038/d41586-018-05113-0")

create_query_strings(my_dois)
create_query_strings(my_dois, term  = 'AND "clinical trial"[Publication Type]')

# With multiple batches of DOIs as a list of character vectors
my_dois_list <- list(c("10.3389/fpsyt.2018.00207", "10.1186/s40779-018-0166-5", "10.1186/s12959-018-0173-5"), c("10.1103/PhysRevD.97.096016", "10.1038/d41586-018-05113-0"))

create_query_strings(my_dois_list)

maia-sh/pubmedparser documentation built on Feb. 18, 2021, 11:44 a.m.