Skip to content

Instantly share code, notes, and snippets.

@daroczig
Created November 15, 2013 10:53
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 daroczig/7482560 to your computer and use it in GitHub Desktop.
Save daroczig/7482560 to your computer and use it in GitHub Desktop.
## compile a list of available packages on CRAN
aps <- as.data.frame(available.packages())
## get the list of Depends and clean up a bit
deps <- gdata::trim(unlist(strsplit(as.character(aps$Depends), ',')))
deps <- gsub('[ \\(].*|\\n', '', deps)
## freq table
depst <- table(deps)
## plot it!
library(wordcloud)
wordcloud(names(depst), log(as.numeric(depst)), colors = c('green', 'red'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment