Automatically installs missing packages loaded with library
.
Overrides base::library
with a library function that automatically installs missing packages. Uses RStudio's redirection servers as the repository URL.
Note autoinstallr::library
has the same API and behavior as base::library
.
install_github('fny/autoinstallr')
library(autoinstallr)
library(library_thats_not_installed)
# => Installs and loads library_thats_not_installed
base::require
getOption('repos')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.