Learn R Programming

metagear (version 0.1)

PDFs_collect: Attempts to download PDFs from multiple DOI links.

Description

Tries to download a collection of PDF files using multiple digital object identifier (DOI) links. Updates a data frame with the success of these downloads. The function is a wrapper for PDF_download. NOTE: A single DOI may generate multiple PDF files.

Usage

PDFs_collect(aDataFrame, DOIcolumn, FileNamecolumn, directory = "downloads",
  validatePDF = TRUE, quiet = FALSE, showSummary = TRUE)

Arguments

aDataFrame
A data frame containing a column of DOIs and a column of individual file names for each downloaded PDF.
DOIcolumn
The label of the column containing all the DOI links.
FileNamecolumn
The label of the column containing all the strings that will be used to rename the downloaded files.
directory
A string of the location (directory) were downloaded PDF files are to be saved. NOTE: helps to have this directory created before initializing the PDFs_collect function.
validatePDF
When TRUE will only save to files that are valid PDF documents. When FALSE will save all candidate files, even if they are not valid PDF formats.
quiet
When FALSE does not print to console individual download progress and summary.
showSummary
When FALSE does not print overall summary of download successes and failures.

Value

  • The data frame with new column containing download-outcome successes.

See Also

PDF_download

Examples

Run this code
data(example_references_metagear)
someRefs <- effort_initialize(example_references_metagear)
dir.create("metagear_downloads")
PDFs_collect(aDataFrame = someRefs, DOIcolumn = "DOI",
             FileNamecolumn = "STUDY_ID", directory = "metagear_downloads")

Run the code above in your browser using DataLab