# This file is a part of the soRvi program (http://louhos.github.com/sorvi/)
# Copyright (C) 2010-2012 Louhos <louhos.github.com>. All rights reserved.
# This program is open source software; you can redistribute it and/or modify
# it under the terms of the FreeBSD License (keep this notice):
# http://en.wikipedia.org/wiki/BSD_licenses
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
install.prequisites <- function(package, ...) {
if (suppressWarnings(!require(package, character.only=TRUE, quietly=TRUE))){
install.packages(package, ...) # Install the packages
require(package, character.only=TRUE) # Remember to load the library after installation
}
invisible(NULL)
}
prequisities <- c("devtools", "pxR", "RCurl", "rjson", "sp", "spdep")
for (pkg in prequisities) {
install.prequisites(pkg)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.