query_wos: Query the Web of Science

View source: R/query-wos.R

query_wosR Documentation

Query the Web of Science

Description

Returns the number of records that match a given query. It's best to call this function before calling pull_wos so that you know how many records you're trying to download before attempting to do so.

Usage

query_wos(query, editions = c("SCI", "SSCI", "AHCI", "ISTP", "ISSHP",
  "BSCI", "BHCI", "IC", "CCR", "ESCI"),
  sid = auth(Sys.getenv("WOS_USERNAME"), Sys.getenv("WOS_PASSWORD")),
  ...)

Arguments

query

Query string. See the WoS query documentation page for details on how to write a query as well as this list of example queries.

editions

Web of Science editions to query. Possible values are listed here.

sid

Session identifier (SID). The default setting is to get a fresh SID each time you query WoS via a call to auth. However, you should try to reuse SIDs across queries so that you don't run into the throttling limits placed on new sessions.

...

Arguments passed along to POST.

Value

An object of class query_result. This object contains the number of publications that are returned by your query (rec_cnt), as well as some info that pull_wos uses when it calls query_wos internally.

Examples

## Not run: 

# Get session ID and reuse it across queries:
sid <- auth("some_username", password = "some_password")

query_wos("TS = (\"dog welfare\") AND PY = (1990-2007)", sid = sid)

# Finds records in which Max Planck appears in the address field.
query_wos("AD = Max Planck", sid = sid)

# Finds records in which Max Planck appears in the same address as Mainz
query_wos("AD = (Max Planck SAME Mainz)", sid = sid)

## End(Not run)

vt-arc/wosr documentation built on Sept. 27, 2022, 5:44 a.m.