Skip to content

Instantly share code, notes, and snippets.

@christopherlovell
Created August 12, 2015 18:27
Show Gist options
  • Save christopherlovell/96a15704d45992a925bd to your computer and use it in GitHub Desktop.
Save christopherlovell/96a15704d45992a925bd to your computer and use it in GitHub Desktop.
miniCRAN package dependencies
setwd("C:/DJB/Data Sandpit/miniCRAN")
library(miniCRAN)
options(repos = c(CRAN = "http://cran.at.r-project.org/"))
pkgs <- c("data.table", "dplyr", "ggplot2","shiny", "shinydashboard", "shinyBS","reshape2","png","shinyTree","igraph","tm","caret")
pkgDep(pkgs, enhances=TRUE)
p <- makeDepGraph(pkgs, enhances = TRUE)
set.seed(1)
plot(p, cex=1, vertex.size=15)
localCRAN <- "N:/Advanced Analytics/miniCRANrepo"
dir.create(localCRAN)
makeRepo(pkgDep(pkgs), path = localCRAN, type = "source")
makeRepo(pkgDep(pkgs), path = localCRAN, type = "win.binary")
list.files(path = localCRAN, recursive = TRUE)
uri <- paste0("file:///", normalizePath(localCRAN))
uri
options(repos = c(CRAN=uri))
getOption("repos")
available.packages(type="source")
available.packages()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment