listed on r-bloggers.com

Montag, 10. Januar 2011

Install R Packages wherever needed

I frequently occupy computers everywhere with extensive MCMC tasks. Installing R doesn't take long, but it can be very annoying if you manually have to install dozens of R packages before your code is able to run. Well, now I use the following command to load my packages:

pccheck <- require(bayesm) ;if(pccheck==FALSE) {install.packages("bayesm") }
view raw gistfile1.r hosted with ❤ by GitHub


This way I don't have to worry about installing packages.

Keine Kommentare:

Kommentar veröffentlichen