Skip to content

Instantly share code, notes, and snippets.

@andrie
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrie/f826769f023b87799541 to your computer and use it in GitHub Desktop.
Save andrie/f826769f023b87799541 to your computer and use it in GitHub Desktop.
# Wrapper around available.packages ---------------------------------------
index <- function(url, type="source", filters=NULL){
contribUrl <- contrib.url(url, type=type)
available.packages(contribUrl, type=type, filters=filters)
}
# CRAN --------------------------------------------------------------------
CRAN <- "http://cran.r-project.org"
index(CRAN)
# Revolution -------------------------------------------------------------
revoStable <- "http://packages.revolutionanalytics.com/cran/3.1/stable"
index(revoStable)
revoMirror <- "http://cran.revolutionanalytics.com"
index(revoMirror)
# R-forge -----------------------------------------------------------------
rforge <- "http://r-forge.r-project.org"
index(rforge)
# BioConductor ------------------------------------------------------------
bioc <- local({
on.exit(rm(env))
env <- new.env()
evalq(source("http://bioconductor.org/biocLite.R", local=TRUE), env)
biocinstallRepos()
})
bioc
bioc[grep("BioC", names(bioc))]
index(bioc["BioCsoft"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment