Downloads article PDF from the famous Sc.-H.b website. The URL of the website
must be stored locally as the environment variable SCIHUB_URL
in the
~/.Renviron
. Use the function usethis::edit_r_environ()
to edit this
file.
get_pdf(doi, download = TRUE, path = ".", filename = "", overwrite = FALSE)
a character
of length 1. The DOI of the article.
a logical
. If TRUE
(default) the PDF is downloaded.
Otherwise the link to the PDF is returned.
a character
of length 1. The directory to save PDFs.
Must exist.
a character
of length 1. The name of PDF
(without extension).
a logical
. If TRUE
and the PDF already exist, the PDF
will be downloaded again. Default if FALSE
.
The PDF link (character
of length 1) or NULL
(no PDF available).
if (FALSE) {
doi <- "10.1111/ele.13778"
get_pdf(doi, path = ".", filename = "2022-mouillot-ecolet")
}