R package authors sometimes like to add the letter “r” to package names (for example, the tidyverse packages). baRcodeR also has an extra “r” at the end as well. I thought I could use some available data see if the letter frequency changes compared to the English language average.
I used two data sets. The first is the percentage frequency of letters in the English language taken from this table of English letter frequencies at the Cornell Math Explorers Club. I originally used the first table from [this wikipedia page] (https://en.wikipedia.org/wiki/Letter_frequency) except that the percentages seem to sum to 108. A text file of the table is available here.
The second dataset is a file of R package names. While it is possible to query CRAN to get the information, Gergely Daróczi has already done so. The csv file can be download here.
avg_distribution sessionInfo()
## R version 3.5.0 (2018-04-23)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 17134)
## ## Matrix products: default
## ## locale:
## [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 ## [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C ## [5] LC_TIME=English_Canada.1252 ## ## attached base packages:
## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages:
## [1] bindrcpp_0.2.2 forcats_0.3.0 stringr_1.3.1 dplyr_0.7.5 ## [5] purrr_0.2.5 readr_1.1.1 tidyr_0.8.1 tibble_1.4.2 ## [9] tidyverse_1.2.1 ggplot2_3.0.0 ## ## loaded via a namespace (and not attached):
## [1] Rcpp_0.12.17 cellranger_1.1.0 pillar_1.2.3 compiler_3.5.0 ## [5] plyr_1.8.4 bindr_0.1.1 tools_3.5.0 digest_0.6.15 ## [9] lubridate_1.7.4 jsonlite_1.5 lattice_0.20-35 evaluate_0.10.1 ## [13] gtable_0.2.0 nlme_3.1-137 pkgconfig_2.0.1 rlang_0.2.2 ## [17] cli_1.0.0 rstudioapi_0.7 yaml_2.1.19 haven_1.1.1 ## [21] blogdown_0.8 xfun_0.3 xml2_1.2.0 httr_1.3.1 ## [25] withr_2.1.2 knitr_1.20 hms_0.4.2 rprojroot_1.3-2 ## [29] grid_3.5.0 tidyselect_0.2.4 glue_1.2.0 R6_2.2.2 ## [33] readxl_1.1.0 rmarkdown_1.10 bookdown_0.7.17 modelr_0.1.2 ## [37] magrittr_1.5 backports_1.1.2 scales_0.5.0 htmltools_0.3.6 ## [41] rvest_0.3.2 assertthat_0.2.0 colorspace_1.3-2 labeling_0.3 ## [45] stringi_1.1.7 lazyeval_0.2.1 munsell_0.5.0 broom_0.5.0 ## [49] crayon_1.3.4