query_wos: Query the Web of Science

Description Usage Arguments Value Examples

View source: R/query-wos.R

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 are trying to download before you attempt to do so.

Usage

1
2
3
4
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 a the 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 the WoS, via a call to auth. However, you should try to reuse SID values over multiple 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 has 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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)

wosr documentation built on Sept. 27, 2018, 5:05 p.m.