Running examples in ‘pubchunks-Ex.R’ failed
The error most likely occurred in:

> ### Name: pub_chunks
> ### Title: Extract chunks of data from articles
> ### Aliases: pub_chunks
> 
> ### ** Examples
> 
> # a file path to an XML file
> x <- system.file("examples/elsevier_1.xml", package = "pubchunks")
> pub_chunks(x, "title")
<pub chunks>
  from: file
  publisher/journal: elsevier/Nefrología (English Edition)
  sections: title
  showing up to first 5: 
   title (n=1): Bibliographic references in PubMed and other searc ...
> pub_chunks(x, "authors")
<pub chunks>
  from: file
  publisher/journal: elsevier/Nefrología (English Edition)
  sections: authors
  showing up to first 5: 
   authors (n=1): Martínez-Castelao, Alberto
> pub_chunks(x, "acknowledgments")
<pub chunks>
  from: file
  publisher/journal: elsevier/Nefrología (English Edition)
  sections: acknowledgments
  showing up to first 5: 
   acknowledgments (n=0): 
> pub_chunks(x, "refs")
<pub chunks>
  from: file
  publisher/journal: elsevier/Nefrología (English Edition)
  sections: refs
  showing up to first 5: 
   refs (n=6): 1A.Martínez-CastelaoJ.L.GórrizJ.BoverJ.Segura-de l
> pub_chunks(x, c("title", "refs"))
<pub chunks>
  from: file
  publisher/journal: elsevier/Nefrología (English Edition)
  sections: title, refs
  showing up to first 5: 
   title (n=1): Bibliographic references in PubMed and other searc ...
   refs (n=6): 1A.Martínez-CastelaoJ.L.GórrizJ.BoverJ.Segura-de l
> 
> # works the same with the xml already in a string
> xml <- paste0(readLines(x), collapse = "")
Warning in readLines(x) :
  incomplete final line found on '/home/ripley/R/Lib32/pubchunks/examples/elsevier_1.xml'
> pub_chunks(xml, "title")
<pub chunks>
  from: character
  publisher/journal: elsevier/Nefrología (English Edition)
  sections: title
  showing up to first 5: 
   title (n=1): Bibliographic references in PubMed and other searc ...
> 
> # also works if you've already read in the XML (with xml2 pkg)
> xml <- paste0(readLines(x), collapse = "")
Warning in readLines(x) :
  incomplete final line found on '/home/ripley/R/Lib32/pubchunks/examples/elsevier_1.xml'
> xml <- xml2::read_xml(xml)
> pub_chunks(xml, "title")
<pub chunks>
  from: xml_document
  publisher/journal: elsevier/Nefrología (English Edition)
  sections: title
  showing up to first 5: 
   title (n=1): Bibliographic references in PubMed and other searc ...
> 
> # Hindawi
> x <- system.file("examples/hindawi_1.xml", package = "pubchunks")
> pub_chunks(x, "abstract")
<pub chunks>
  from: file
  publisher/journal: hindawi/Advances in Chemistry
  sections: abstract
  showing up to first 5: 
   abstract (n=1): An expeditious route to fused triazolo-pyrido benz ...
> pub_chunks(x, "authors")
<pub chunks>
  from: file
  publisher/journal: hindawi/Advances in Chemistry
  sections: authors
  showing up to first 5: 
   authors (n=9): nested list
> pub_chunks(x, "aff")
<pub chunks>
  from: file
  publisher/journal: hindawi/Advances in Chemistry
  sections: aff
  showing up to first 5: 
   aff (n=9): nested list
> pub_chunks(x, "title")
<pub chunks>
  from: file
  publisher/journal: hindawi/Advances in Chemistry
  sections: title
  showing up to first 5: 
   title (n=1): Flow and Microwave Induced Pellizzari Reactions: S ...
> pub_chunks(x, c("abstract", "title", "authors", "refs"))
<pub chunks>
  from: file
  publisher/journal: hindawi/Advances in Chemistry
  sections: abstract, title, authors, refs
  showing up to first 5: 
   abstract (n=1): An expeditious route to fused triazolo-pyrido benz ...
   title (n=1): Flow and Microwave Induced Pellizzari Reactions: S ...
   authors (n=9): nested list
   refs (n=21): 1SchützH.Benzodiazepines II1989Berlin, HeidelbergS
> 
> # Pensoft
> x <- system.file("examples/pensoft_1.xml", package = "pubchunks")
> pub_chunks(x, "abstract")
<pub chunks>
  from: file
  publisher/journal: pensoft/ZooKeys
  sections: abstract
  showing up to first 5: 
   abstract (n=1): AbstractNineteen species of seed-beetles belonging ...
> pub_chunks(x, "aff")
<pub chunks>
  from: file
  publisher/journal: pensoft/ZooKeys
  sections: aff
  showing up to first 5: 
   aff (n=7): nested list
> pub_chunks(x, "title")
<pub chunks>
  from: file
  publisher/journal: pensoft/ZooKeys
  sections: title
  showing up to first 5: 
   title (n=1): Contribution to the knowledge of seed-beetles (Col ...
> pub_chunks(x, c("abstract", "title", "authors", "refs"))
<pub chunks>
  from: file
  publisher/journal: pensoft/ZooKeys
  sections: abstract, title, authors, refs
  showing up to first 5: 
   abstract (n=1): AbstractNineteen species of seed-beetles belonging ...
   title (n=1): Contribution to the knowledge of seed-beetles (Col ...
   authors (n=7): nested list
   refs (n=13): AntonKW (2010) Catalogue of Palaearctic Coleoptera
> 
> # Peerj
> x <- system.file("examples/peerj_1.xml", package = "pubchunks")
> pub_chunks(x, "abstract")
<pub chunks>
  from: file
  publisher/journal: peerj/PeerJ
  sections: abstract
  showing up to first 5: 
   abstract (n=1): Climate change is predicted to lead to more extrem ...
> pub_chunks(x, "authors")
<pub chunks>
  from: file
  publisher/journal: peerj/PeerJ
  sections: authors
  showing up to first 5: 
   authors (n=7): nested list
> pub_chunks(x, "aff")
<pub chunks>
  from: file
  publisher/journal: peerj/PeerJ
  sections: aff
  showing up to first 5: 
   aff (n=7): nested list
> pub_chunks(x, "title")
<pub chunks>
  from: file
  publisher/journal: peerj/PeerJ
  sections: title
  showing up to first 5: 
   title (n=1): Storm effects on intertidal invertebrates: increas ...
> pub_chunks(x, c("abstract", "title", "authors", "refs"))
<pub chunks>
  from: file
  publisher/journal: peerj/PeerJ
  sections: abstract, title, authors, refs
  showing up to first 5: 
   abstract (n=1): Climate change is predicted to lead to more extrem ...
   title (n=1): Storm effects on intertidal invertebrates: increas ...
   authors (n=7): nested list
   refs (n=60): Alcántara-Carrió et al. (2017)Alcántara-CarrióJSas
> 
> # Frontiers
> x <- system.file("examples/frontiers_1.xml", package = "pubchunks")
> pub_chunks(x, "authors")
<pub chunks>
  from: file
  publisher/journal: frontiers/Frontiers in Microbiology
  sections: authors
  showing up to first 5: 
   authors (n=8): nested list
> pub_chunks(x, "aff")
<pub chunks>
  from: file
  publisher/journal: frontiers/Frontiers in Microbiology
  sections: aff
  showing up to first 5: 
   aff (n=8): nested list
> pub_chunks(x, c("doi", "abstract", "title", "authors", "refs", "abstract"))
<pub chunks>
  from: file
  publisher/journal: frontiers/Frontiers in Microbiology
  sections: doi, abstract, title, authors, refs, abstract
  showing up to first 5: 
   doi (n=1): 10.3389/fmicb.2012.00403
   abstract (n=1): Our current understanding of Antarctic soils is de ...
   title (n=1): Metagenomic Analysis of a Southern Maritime Antarc ...
   authors (n=8): nested list
   refs (n=56): AislabieJ.BroadyP.SaulD. (2006). Culturable hetero
> 
> # eLife
> x <- system.file("examples/elife_1.xml", package = "pubchunks")
> pub_chunks(x, "authors")
<pub chunks>
  from: file
  publisher/journal: elife/eLife
  sections: authors
  showing up to first 5: 
   authors (n=6): nested list
> pub_chunks(x, "aff")
<pub chunks>
  from: file
  publisher/journal: elife/eLife
  sections: aff
  showing up to first 5: 
   aff (n=6): nested list
> pub_chunks(x, c("doi", "title", "authors", "refs"))
<pub chunks>
  from: file
  publisher/journal: elife/eLife
  sections: doi, title, authors, refs
  showing up to first 5: 
   doi (n=1): 10.7554/eLife.03032
   title (n=1): MicroRNA-mediated repression of nonsense mRNAs
   authors (n=6): nested list
   refs (n=56): BartelDP2004MicroRNAs: genomics, biogenesis, mecha
> 
> # f1000research
> x <- system.file("examples/f1000research_1.xml", package = "pubchunks")
> pub_chunks(x, "title")
<pub chunks>
  from: file
  publisher/journal: f1000research/F1000Research
  sections: title
  showing up to first 5: 
   title (n=1): Taxa: An R package implementing data standards and ...
> pub_chunks(x, "aff")
<pub chunks>
  from: file
  publisher/journal: f1000research/F1000Research
  sections: aff
  showing up to first 5: 
   aff (n=29): nested list
> pub_chunks(x, c("doi", "title", "authors", "keywords", "refs"))
<pub chunks>
  from: file
  publisher/journal: f1000research/F1000Research
  sections: doi, title, authors, keywords, refs
  showing up to first 5: 
   doi (n=1): 10.12688/f1000research.14013.2
   title (n=1): Taxa: An R package implementing data standards and ...
   authors (n=17): nested list
   keywords (n=7): R language, taxonomy, taxa, R package, rOpenSci, m
   refs (n=14): ChamberlainS:
                    rgbif: Interface
> 
> ## Not run: 
> ##D # Copernicus
> ##D x <- system.file("examples/copernicus_1.xml", package = "pubchunks")
> ##D pub_chunks(x, c("doi", "abstract", "title", "authors", "refs"))
> ##D pub_chunks(x, "aff")
> ##D 
> ##D # MDPI
> ##D x <- system.file("examples/mdpi_1.xml", package = "pubchunks")
> ##D x <- system.file("examples/mdpi_2.xml", package = "pubchunks")
> ##D pub_chunks(x, "title")
> ##D pub_chunks(x, "aff")
> ##D vv <- pub_chunks(x, c("doi", "title", "authors", "keywords", "refs", 
> ##D   "abstract", "categories"))
> ##D vv$doi
> ##D vv$title
> ##D vv$authors
> ##D vv$keywords
> ##D vv$refs
> ##D vv$abstract
> ##D vv$categories
> ## End(Not run)
> 
> # Many inputs at once
> x <- system.file("examples/frontiers_1.xml", package = "pubchunks")
> y <- system.file("examples/elife_1.xml", package = "pubchunks")
> z <- system.file("examples/f1000research_1.xml", package = "pubchunks")
> pub_chunks(list(x, y, z), c("doi", "title", "authors", "refs"))
[[1]]
<pub chunks>
  from: file
  publisher/journal: frontiers/Frontiers in Microbiology
  sections: doi, title, authors, refs
  showing up to first 5: 
   doi (n=1): 10.3389/fmicb.2012.00403
   title (n=1): Metagenomic Analysis of a Southern Maritime Antarc ...
   authors (n=8): nested list
   refs (n=56): AislabieJ.BroadyP.SaulD. (2006). Culturable hetero

[[2]]
<pub chunks>
  from: file
  publisher/journal: elife/eLife
  sections: doi, title, authors, refs
  showing up to first 5: 
   doi (n=1): 10.7554/eLife.03032
   title (n=1): MicroRNA-mediated repression of nonsense mRNAs
   authors (n=6): nested list
   refs (n=56): BartelDP2004MicroRNAs: genomics, biogenesis, mecha

[[3]]
<pub chunks>
  from: file
  publisher/journal: f1000research/F1000Research
  sections: doi, title, authors, refs
  showing up to first 5: 
   doi (n=1): 10.12688/f1000research.14013.2
   title (n=1): Taxa: An R package implementing data standards and ...
   authors (n=17): nested list
   refs (n=14): ChamberlainS:
                    rgbif: Interface

attr(,"ft_data")
[1] FALSE
> 
> # non-XML files/content are xxx?
> # pub_chunks('foo bar')
> 
> # Pubmed brief XML files (abstract only)
> x <- system.file("examples/pubmed_brief_1.xml", package = "pubchunks")
> pub_chunks(x, "title")
Error in curl::curl_fetch_memory(x$url$url, handle = x$url$handle) : 
  Timeout was reached: [api.crossref.org] Resolving timed out after 10000 milliseconds
Calls: pub_chunks ... <Anonymous> -> <Anonymous> -> crul_fetch -> <Anonymous>
Execution halted