search_wos: Automatic search on Web Of Science database

View source: R/Record_search.R

search_wosR Documentation

Automatic search on Web Of Science database

Description

This function performs an API search on Web Of Science (WOS), taking care of the authorization steps and query normalization. The user is needed to provide an API key by accessing https://www.webofknowledge.com with an authorized account (e.g. access through an academic VPN or proxy). The key can be found in the URL once the user is authorized. The key has a time limit, so it will need to be regenerated. The function is a wrapper over wosr::pull_wos() and requires the wosr package.

Usage

search_wos(
  query,
  year_query = NULL,
  additional_fields = NULL,
  api_key = getOption("baysren.wos_api_key"),
  parallel = TRUE,
  parse_query = TRUE,
  ...
)

Arguments

query

A boolean query with AND/OR/NOT operators, brackets for term grouping and quotation marks for n-grams.

year_query

A year based filtering query. See clean_date_filter_arg() for more info.

additional_fields

Additional fields to add to the query. Won't be normalized so it must already follow WOS specific syntax.

api_key

Necessary to access WOS database. See Details.

parallel

Whether to use parallel execution to speed up result collection. Works only on Unix-based systems.

parse_query

Whether to normalize the query into WOS specific syntax. If FALSE, it is assumed that the query is already in the format required by WOS API.

...

Additional arguments for wosr::pull_wos(), excluding query and sid.

Value

A data frame of records.

Examples


# Initial query to be built on domain knowledge. It accepts OR, AND, NOT
# boolean operators and round brackets to group terms.
query <- '((model OR models OR modeling OR network OR networks) AND
(dissemination OR transmission OR spread OR diffusion) AND (nosocomial OR
hospital OR "long-term-care" OR "long term care" OR "longterm care" OR
"long-term care" OR "healthcare associated") AND (infection OR resistance OR
resistant))'

# Year filter. The framework converts it to the API-specific format
# seamlessly. Common logical comparators can be used, i.e. <, <=, >, >=,
# while dashes denotes inclusive date intervals. A single year restricts
# results to one year period.
year_filter <- "2010-2020"

## Not run: 
records <- search_wos(query, year_filter)

## End(Not run)

bakaburg1/BaySREn documentation built on March 30, 2022, 12:16 a.m.