Skip to contents

Download PDF's of all the papers in your search results

Usage

mx_download(
  mx_results,
  directory,
  create = TRUE,
  name = c("ID", "DOI"),
  print_update = 10
)

Arguments

mx_results

Vector containing the links to the medRxiv PDFs

directory

The location you want to download the PDF's to

create

TRUE or FALSE. If TRUE, creates the directory if it doesn't exist

name

How to name the downloaded PDF. By default, both the ID number of the record and the DOI are used.

print_update

How frequently to print an update

See also

Examples

# \donttest{
mx_results <- mx_search(mx_snapshot(), query = "10.1101/2020.02.25.20021568")
#> Warning: downloaded length 0 != reported length 452
#> Warning: cannot open URL 'https://raw.githubusercontent.com/YaoxiangLi/medrxivr-data/main/snapshot_part3.csv': HTTP status was '503 Service Unavailable'
#> Failed to read file: snapshot_part3.csv
#> Found 1 record(s) matching your search.
mx_download(mx_results, directory = tempdir())
#> Estimated time to completion: 0 hours
#> Downloading PDF 1 of 1 (DOI: 2099_10.1101_2020.02.25.20021568). . . 
# }