### ### getOOMPA.R ### sourceOOMPAinstallScript <- function() { thisRVer <- paste(R.Version()[c("major", "minor")], collapse=".") ## Verify we're running a recent enough version of R. requiredRVer <- "2.8.0" stopifnot(require("utils")) if (compareVersion(thisRVer, requiredRVer) < 0) { stop(paste("\nYou are currently running R version ", thisRVer, ",\n", "however an R version greater than ", requiredRVer, " is required.\n", "To obtain the latest version of R, please see:\n", " http://www.r-project.org/\n", sep="")) } if (compareVersion(thisRVer, "3.0.0") >= 0) choppedRVer <- "3.0" else choppedRVer <- gsub("(\\w+).(\\w+).(\\w+)", "\\1.\\2", thisRVer) scriptUrl <- paste("http://bioinformatics.mdanderson.org", "OOMPA", "installScripts", choppedRVer, "oompaInstall.R", sep="/") safeSource <- function() { source(scriptUrl, local=TRUE) for (objname in ls(all.names=TRUE)) { if (exists(objname, envir=.GlobalEnv, inherits=FALSE)) warning("Redefining ", sQuote(objname)) .GlobalEnv[[objname]] <- get(objname, inherits=FALSE) } } safeSource() #cat("OK\n") } sourceOOMPAinstallScript() ### Install OOMPA packages using CRAN-style repositories. ### ...: arguments passed to install.packages. getOOMPA <- function(...) { oompainstall(...) }