March 19, 2014

What packages do you use?

Reference

What unique packages do you use? There are more than 5,000 packages uploaded to CRAN. Because the objects of R users is unique, the packages which each R users might be different. Thus I compare all my installed packages to Rstudio popular 200 packages in 2013.

Here's the result.

# All my installed packages
res <- data.frame(name = row.names(installed.packages()), installed.packages(), 
    stringsAsFactors = FALSE)
# All my installed packages remove base pakcges
res <- subset(res, !(Priority %in% c("base")))

packageRanking2013 <- read.csv("http://dl.dropboxusercontent.com/u/956851/RStudio_CRAN_data.csv", 
    as.is = TRUE, encoding = "UTF-8")
range_rank <- 200

res_diff <- setdiff(res$name, as.character(packageRanking2013$package)[seq_len(range_rank)])
cat("The number of my installed packages are", length(res$name))
## The number of my installed packages are 122
cat("The number of unique packages are", length(res_diff), "(", round(length(res_diff) * 
    100/length(res$name), 1), "%)")
## The number of unique packages are 50 ( 41 %)

Unique packages are as follows:

sort(res_diff)
##  [1] "archetypes"           "assertthat"           "audio"               
##  [4] "base64enc"            "BH"                   "bigrquery"           
##  [7] "bit64"                "brew"                 "clickme"             
## [10] "codetools"            "d3Network"            "dplyr"               
## [13] "extrafont"            "extrafontdb"          "ggvis"               
## [16] "googleVis"            "hflights"             "highr"               
## [19] "jsonlite"             "knitrBootstrap"       "Lahman"              
## [22] "lambda.r"             "magrittr"             "manipulate"          
## [25] "microbenchmark"       "minqa"                "nnls"                
## [28] "PerformanceAnalytics" "pingr"                "pings"               
## [31] "profr"                "proftools"            "rCharts"             
## [34] "relenium"             "Rfacebook"            "rMaps"               
## [37] "RMeCab"               "Rook"                 "RPostgreSQL"         
## [40] "rstudio"              "Rttf2pt1"             "seleniumJars"        
## [43] "slideshare"           "slidify"              "slidifyLibraries"    
## [46] "tableone"             "twitteR"              "vadr"                
## [49] "yaml"                 "yeah"

If you want to set the period of package download, the code below might be helpful.

library(installr)
library(dplyr)
RStudio_CRAN_data_folder <- download_RStudio_CRAN_data(START = "2013-01-01", 
    END = "2013-12-31")
RStudio_CRAN_data <- read_RStudio_CRAN_data(RStudio_CRAN_data_folder)
RStudio_CRAN_data <- format_RStudio_CRAN_data(my_RStudio_CRAN_data)
RStudio_CRAN_data <- subset(my_RStudio_CRAN_data, !is.na(package))
packageRanking2013 <- RStudio_CRAN_data %.% filter(!is.na(package)) %.% group_by(package) %.% 
    summarise(count = n()) %.% arrange(desc(count))
write.csv(packageRanking2013, "RStudio_CRAN_data.csv", row.names = FALSE)

Reference

http://www.r-statistics.com/2013/06/top-100-r-packages-for-2013-jan-may/

No comments:

Post a Comment