load.libraries <- function(needed.packs,quietly=T){
installed.packs <- installed.packages()
for(pack in needed.packs){
if(!pack %in% installed.packs){
install.packages(pack,repos='http://cran.cnr.Berkeley.edu')
}
if(quietly){
suppressPackageStartupMessages(library(pack,character.only=T,quietly=quietly))
}else{
library(pack,character.only=T)
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.