下面代码显示到2016年10月25日为止,按照下载量最高的50个package:

library(plyr)
library(XML)

# build a vector of URL pages we'll want to use
urls <- paste("http://crantastic.org/popcon?page=", 1:10, sep = "")

# scrape all the data from the URLs into one big data.frame
packages.df <- ldply(urls, function(url)readHTMLTable(url)[[1]])

# turn the "Users" column from factor to numeric
packages.df$Users <- as.numeric(as.character(packages.df$Users))

# sort by decreasing "Users"
packages.df <- arrange(packages.df, desc(Users))

# print the 50 most used packages
head(packages.df$`Package Name`, 50)
##  [1] data.table      ggplot2         plyr            reshape        
##  [5] Sim.DiffProc    Sim.DiffProcGUI lme4            Hmisc          
##  [9] lattice         xtable          randomForest    RODBC          
## [13] stringr         reshape2        RColorBrewer    MASS           
## [17] foreign         RSQLite         car             ggplot         
## [21] sp              XML             foreach         Matrix         
## [25] survival        RCurl           zoo             rgl            
## [29] RMySQL          survey          RTextTools      devtools       
## [33] caret           quantmod        twitteR         xts            
## [37] lubridate       testthat        vegan           Rcpp           
## [41] xlsReadWrite    latticeExtra    tikzDevice      boot           
## [45] maptools        cacheSweave     maxent          nlme           
## [49] igraph          Rcmdr          
## 500 Levels: A3 Amelia BayesQTLBIC BEDMatrix BiodiversityR ... wavethresh