plos_fulltext: Get full text xml of PLOS papers given a DOI

Description Usage Arguments Value Examples

Description

Get full text xml of PLOS papers given a DOI

Usage

1
2
3
4
plos_fulltext(doi, ...)

## S3 method for class 'plosft'
print(x, ...)

Arguments

doi

One or more DOIs

...

Curl options passed on to HttpClient

x

Input to print method

Value

Character string of XML.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
plos_fulltext(doi='10.1371/journal.pone.0086169')
plos_fulltext(c('10.1371/journal.pone.0086169',
  '10.1371/journal.pbio.1001845'))
dois <- searchplos(q = "*:*", 
  fq = list('doc_type:full', 'article_type:"Research Article"'), 
  limit = 3)$data$id
out <- plos_fulltext(dois)
out[dois[1]]
out[1:2]

# Extract text from the XML strings - xml2 package required
if (requireNamespace("xml2")) {
  library("xml2")
  lapply(out, function(x){
    tmp <- xml2::read_xml(x)
    xml2::xml_find_all(tmp, "//ref-list//ref")
  })
}


## End(Not run)

rplos documentation built on May 6, 2019, 1:08 a.m.