Get article length of single paper by DOI, or of many papers as histogram.

Usage

articlelength(id = NA, fields = NA, limit = NA, searchin = NA, url = "http://api.plos.org/search",
  key = getOption("PlosApiKey", stop("need an API key for PLoS Journals")), ...,
      curl = getCurlHandle())

Arguments

id
article identifier DOI = id, or subject area, e.g.: 'ecology'
fields
fields to return from search (character) [e.g., 'id,title'], any combination of search fields [see plosfields$field]
limit
number of results to return (integer)
searchin
search field to search in (character)
url
the PLoS API url for the function (should be left to default)
key
your PLoS API key, either enter, or loads from .Rprofile
...
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

Length of articles (no. words) as text (single paper) or histogram (>1 paper).

Description

Get article length of single paper by DOI, or of many papers as histogram.

Examples

## Not run: # articlelength("10.1371/journal.pone.0004045", "body")# articlelength("10.1371/journal.pone.0004045", "everything")# articlelength("10.1371/journal.pone.0004045", "title")# articlelength("ecology", "materials_and_methods", 500, "subject")# articlelength("ecology", "results_and_discussion", 500, "subject")# ## End(Not run)