Data scientist @ Mendelics. Post doc @ USP. PhD in Epigenomics. BSc in Biomedical Sciences.
Data scientist @ Mendelics.
Post doc @ USP.
PhD in Epigenomics.
BSc in Biomedical Sciences.
Posts
Data scientist @ Mendelics. Post doc @ USP. PhD in Epigenomics. BSc in Biomedical Sciences.
@teunbrand@fosstodon.org rlang::check_installed() is interactive, which means you need to allow it to install the package, while loadinstall::dynamic_require() will install it right away (it may ask whether you want to update a/s/n packages though).
Furthermore, {loadinstall} has two other functions to load/install packages from github or bioconductor :)
Data scientist @ Mendelics. Post doc @ USP. PhD in Epigenomics. BSc in Biomedical Sciences.
Data scientist @ Mendelics. Post doc @ USP. PhD in Epigenomics. BSc in Biomedical Sciences.
Three simple functions:
- CRAN: dynamic_require()
- Github: github_dynamic_require()
- Bioconductor: bioc_dynamic_require()
Check the README on github to understand better how it works, it's quite simple.
2/3
Data scientist @ Mendelics. Post doc @ USP. PhD in Epigenomics. BSc in Biomedical Sciences.
Tired of adding a chunk of code to check whether a package is installed or not in your env before loading?
I have created a package to do this!
{loadinstall} will load the R package if it is installed, and install + load if it is not.