knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  progress = FALSE,
  error = FALSE, 
  message = FALSE,
  warning = FALSE
)


Installation

You can get the stable version from CRAN:

install.packages("wosr")

Or the development version from GitHub:

if (!"devtools" %in% rownames(installed.packages())) 
  install.packages("devtools")

devtools::install_github("vt-arc/wosr")

Web of Science

library(wosr)

# Save your WoS API username and password in environment variables
Sys.setenv(WOS_USERNAME = "your_username", WOS_PASSWORD = "your_password")

# Get session ID
sid <- auth()
library(wosr)
sid <- auth()
# Query WoS to see how many results match your query
query <- 'TS = ("animal welfare") AND PY = (2002-2003)'
query_wos(query, sid = sid)
# Download data
pull_wos(query, sid = sid)

InCites

# Save your InCites developer key in an environment variable
Sys.setenv(INCITES_KEY = "your_key")
# Vector of UTs (publication identifiers) to get InCites data for
uts <- c("000272272000015", "000272366800025", "000272877700013")

# Download InCites data for those UTs
pull_incites(uts)

Web of Science and InCites

# Download WoS data
wos <- pull_wos('TS = ("dog welfare")', sid = sid)

# Download InCites data
head(pull_incites(wos$publication$ut))


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