Downloads a paper and its supplementary files from a DOI, a PubMed Central
or PubMed id, a link to the article, or a link to a model file, so that the
model can be loaded with mvp_model() (or translated, see
mvp_translate()) and simulated with the study's dosing. Open-access papers
come from Europe PMC (full text and supplementary files); for other papers
the publisher's PDF is downloaded if this computer has access to it.
Supplementary ZIP files are unpacked, and each file is classified: NONMEM
control streams and their .ext estimates, mrgsolve code, documents
(PDF, Word, text) and data.
Arguments
- source
A DOI (
"10.1002/psp4.70023"or adoi.orglink), a PubMed Central id ("PMC1234567"), a PubMed id, a link to the article page, or a link to a file (.ctl,.mod,.txt,.cpp,.pdf,.docx,.zip).- dir
Folder to save the files in (default: a new temporary folder). If it already holds files, a new subfolder of it is used, so that only this paper's files are listed.
Value
An mvp_paper object: a list with title, doi, pmcid,
open_access, text (the paper as plain text, without references, also
saved as paper.txt), files (a data frame of the files with kind and
path), dir and notes (what could not be found). Load a model file
with mvp_model(file = files$path[i]).
Examples
if (FALSE) { # \dontrun{
paper <- mvp_fetch_paper("PMC1234567") # needs internet access
paper # title, files found
ctl <- paper$files$path[paper$files$kind == "NONMEM model"][1]
mod <- mvp_model(file = ctl) # translated with nonmem2mrgsolve if the .ext is there
} # }