Skip to content

Instantly share code, notes, and snippets.

@thirdwing
Created June 20, 2017 22:26
Show Gist options
  • Save thirdwing/6335dffc2a1ffad8c42cacf0d7070c76 to your computer and use it in GitHub Desktop.
Save thirdwing/6335dffc2a1ffad8c42cacf0d7070c76 to your computer and use it in GitHub Desktop.
library(devtools)
library(miniCRAN)
options(repos=c(CRAN="https://cran.rstudio.com"))
pkg <- devtools:::load_pkg_description(".", create = NA)
parsed <- lapply(pkg, devtools:::parse_deps)
tags <- c(parsed$imports$name, parsed$depends$name)
mx_deps <- miniCRAN:::pkgDep(tags, suggests = FALSE, enhances = FALSE)
write.table(
as.data.frame(mx_deps),
file="mxnet_dependencies",
quote=F,
sep=" ",
row.names=F,
col.names=F
)
dep_graph <- tools:::package_dependencies(mx_deps, recursive=TRUE)
utils::str(dep_graph, vec.len=10)
pkg_names <- names(dep_graph)
fname <- "test.txt"
for (i in c(1:length(dep_graph))) {
cat(pkg_names[i], file = fname, sep = "", append = TRUE)
cat(":", file = fname, sep = "", append = TRUE)
cat(dep_graph[[i]], file = fname, sep = " ", append = TRUE)
cat("\n", file = fname, sep = "", append = TRUE)
}
Rcpp:methods utils
DiagrammeR:dplyr htmlwidgets igraph influenceR magrittr RColorBrewer rstudioapi rgexf scales stringr tibble viridis visNetwork assertthat bindrcpp glue methods pkgconfig rlang R6 Rcpp utils BH plogr htmltools jsonlite yaml Matrix NMF irlba XML Rook dichromat plyr munsell labeling stringi viridisLite stats ggplot2 gridExtra tools bindr digest grid gtable MASS reshape2 lazyeval grDevices graphics lattice colorspace pkgmaker registry rngtools cluster gridBase foreach doParallel brew iterators parallel codetools xtable
visNetwork:htmlwidgets htmltools jsonlite magrittr utils methods digest Rcpp yaml
data.table:methods
jsonlite:methods
magrittr:
stringr:stringi magrittr tools utils stats
dplyr:assertthat bindrcpp glue magrittr methods pkgconfig rlang R6 Rcpp tibble utils BH plogr tools bindr
htmlwidgets:htmltools jsonlite yaml utils digest Rcpp methods
igraph:methods Matrix magrittr NMF irlba stats graphics grid utils lattice pkgmaker registry rngtools cluster stringr digest grDevices gridBase colorspace RColorBrewer foreach doParallel ggplot2 reshape2 iterators parallel codetools gtable MASS plyr scales tibble lazyeval tools xtable Rcpp stringi dichromat munsell labeling rlang
influenceR:igraph Matrix methods utils magrittr NMF irlba graphics grid stats lattice grDevices pkgmaker registry rngtools cluster stringr digest gridBase colorspace RColorBrewer foreach doParallel ggplot2 reshape2 iterators parallel codetools gtable MASS plyr scales tibble lazyeval tools xtable Rcpp stringi dichromat munsell labeling rlang
RColorBrewer:
rstudioapi:
rgexf:XML Rook igraph methods Matrix magrittr NMF irlba utils tools brew stats graphics grid lattice pkgmaker registry rngtools cluster stringr digest grDevices gridBase colorspace RColorBrewer foreach doParallel ggplot2 reshape2 iterators parallel codetools gtable MASS plyr scales tibble lazyeval xtable Rcpp stringi dichromat munsell labeling rlang
scales:RColorBrewer dichromat plyr munsell labeling methods Rcpp stats colorspace utils graphics grDevices
tibble:methods rlang Rcpp utils
viridis:viridisLite stats ggplot2 gridExtra digest grid gtable MASS plyr reshape2 scales tibble lazyeval grDevices graphics utils methods Rcpp stringr RColorBrewer dichromat munsell labeling rlang colorspace stringi magrittr tools
assertthat:tools
bindrcpp:Rcpp bindr plogr methods utils
glue:methods
pkgconfig:utils
rlang:
R6:
BH:
plogr:
htmltools:utils digest Rcpp methods
yaml:
Matrix:methods graphics grid stats utils lattice grDevices
NMF:methods utils pkgmaker registry rngtools cluster graphics stats stringr digest grid grDevices gridBase colorspace RColorBrewer foreach doParallel ggplot2 reshape2 iterators parallel codetools gtable MASS plyr scales tibble lazyeval tools xtable Rcpp stringi magrittr dichromat munsell labeling rlang
irlba:Matrix stats methods graphics grid utils lattice grDevices
XML:methods utils
Rook:utils tools methods brew
dichromat:stats
plyr:Rcpp methods utils
munsell:colorspace methods graphics grDevices
labeling:
stringi:tools utils stats
viridisLite:
ggplot2:digest grid gtable MASS plyr reshape2 scales stats tibble lazyeval grDevices graphics utils methods Rcpp stringr RColorBrewer dichromat munsell labeling rlang colorspace stringi magrittr tools
gridExtra:gtable grid grDevices graphics utils
bindr:
digest:
gtable:grid
MASS:grDevices graphics stats utils methods
reshape2:plyr stringr Rcpp methods utils stringi magrittr tools stats
lazyeval:
lattice:grid grDevices graphics stats utils
colorspace:methods graphics grDevices
pkgmaker:stats registry methods tools codetools digest stringr xtable grDevices utils stringi magrittr
registry:utils
rngtools:methods pkgmaker stringr digest stats registry tools codetools xtable grDevices stringi magrittr utils
cluster:graphics grDevices stats utils
gridBase:graphics grid
foreach:codetools utils iterators
doParallel:foreach iterators parallel utils codetools
brew:
iterators:utils
codetools:
xtable:stats utils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment