autoinst
autoinst copied to clipboard
Automatically install packages when they are missing
Autoinst
Automatically install CRAN or GitHub packages when they are missing.
Simply add the following to your .Rprofile and packages will be automatically installed when they fail to load.
options(error = autoinst::autoinst)
Then missing packages will be automatically installed, so you can then simply re-run the call.
options(error = autoinst::autoinst)
remove.packages("ggplot2");unloadNamespace("ggplot2")
print(ggplot2::qplot(mtcars$mpg, mtcars$wt))