Learn R Programming

rplos (version 0.4.1)

plosword: Search results on a keyword over all fields in PLoS Journals.

Description

Search results on a keyword over all fields in PLoS Journals.

Usage

plosword(terms, vis = FALSE, key = getOption("PlosApiKey",
  stop("need an API key for PLoS Journals")), curl = getCurlHandle(),
  callopts = list())

Arguments

terms
search terms (character)
vis
visualize results in bar plot or not (TRUE or FALSE)
key
your PLoS API key, either enter, or loads from .Rprofile
callopts
Optional additional curl options (debugging tools mostly)
curl
If using in a loop, call getCurlHandle() first and pass the returned value in here (avoids unnecessary footprint)

Value

  • Number of search results (vis = FALSE), or number of search in a table and a histogram of results (vis = TRUE).

Examples

Run this code
plosword('Helianthus')
plosword(list('monkey','Helianthus','sunflower','protein','whale'),
   vis = TRUE)
out <- plosword(list('monkey','replication','design','sunflower','whale'),
   vis = TRUE)
out[[1]] # results in a data frame
out[[2]] # results in a bar plot

# Pass in curl options
plosword('Helianthus', callopts=list(verbose=TRUE))

Run the code above in your browser using DataLab