Open main menu

Wikiversity β

Searching R Packages

This article (a) summarizes what the authors know of available search capabilities for R (programming language) and (b) invites readers to contribute ideas for improvement. It is placed on Wikiversity and listed currently as a “research project” to encourage a wide discussion of the issues it raises moderated by the Wikimedia rules that invite contributors to “be bold but not reckless,” contributing revisions written from a neutral point of view, citing credible sources -- and raising other questions and concerns on the associated '“Discuss”' page. Your contribution(s) to this article may help transform it from a dream into a very useful reality.
initial draft by Spencer Graves with help from John Nash and Julia Silge

As I am writing this 2018-01-22, there are 12,126 active packages on the Comprehensive R Archive Network (CRAN). Just over a year ago, 2017-01-07, John Nash[1] wrote me saying “There are now over 9000 packages on CRAN, with many more in Bioconductor, on Github, and other repositories. How can or should R users navigate this large and unruly collection of packages to find the tools they need and use them effectively?”

John asked me, because almost eight years earlier, I had published the “sos” package that allowed users to search for packages, not just help pages as had been available with the previous RSiteSearch{utils} function.[2]

However, “sos” is still a command line solution and has largely been replaced by newer tools like the CRANsearcher addin for RStudio, crantastic, and RDocumentation. Only 2.2 percent of respondents in Julia Silge's recent survey[3] said they used “R packages built for search such as the sos package.” Some “sos” features could be improved, but R users might benefit more from using that effort to improve more popular search capabilities.


Summary table of search capabilities devoted to REdit

The following table summarizes our understanding of search capabilities devoted to R:

search capability introduced comments base::readLines, vkR::getURLs
Getting Help with R[4] early Official overview of various help facilities recognized by the R Core Team, updated to mention help(), vignettes, demo(), apropos(),, help.start(), RSiteSearch, CRAN Task Views, FAQs, Stack Overflow, and R Email Lists. help(), demo(), apropos(), and access only locally installed documentation.[5]
R site search[6] early Search email lists and R web sites Clumsy relative to for many things. If you want a URL for a package and function in the R Site Search database, you can often get it similar to[5]
Rseek[7] early Search email lists and R web sites including, e.g., These help files were found quickly -- in RDocumentation.[5]
Nabble R Forum[8] early Search email lists and R web sites Found questions about "readLines". A request for "base::readLines" generated, "This query is invalid."[5]
Google Advanced Search[9] 2010s the advanced search feature of the Google search engine A naive search for "readLines", "getURLs", "base::readLines" and "vkR::getURLs" got similar functions in other languages in addition to possibly relevant resources in R.[5]
RSiteSearch[10] 2004 R function in the “utils” package that searches a database of email lists plus all the help pages in packages on CRAN and Bioconductor plus a few others. Same results as with with "R Site Search" web site above with query entered from within R.[5]
sos[11] 2009 R package to search for packages, not just help pages, in the RSiteSearch database.[2] Found 'readLines' and 'getURLs', but it but took longer than some of the other options. "???base::readLines" and "???vkR::getURLs" threw errors.[5]
Metacran[12] 2010s Includes "Featured packages", "Most downloaded", "Trending", "Most depended upon", and "Recently updated", but CRAN only. Invites contributions for further development on their github site.[13] Searching for "base" or "readLines", "base::readLines", "getURLs" and "vkR::getURLs" returned, "did not match any packages."[5]
crantastic[14] 2010s Includes "Most popular packages" and "Recent activity" with user reviews, but CRAN only. Searches for "readLines" and "getURLs" returned, "no results were found." Searches for "base::readLines" and "vkR::getURLs" returned, "The page you were looking for doesn't exist."[5]
CRANsearcher[15] since 2011 RStudio addin - CRAN only with user reviews. Searching for "base" or "readLines", "base::readLines", "getURLs" and "vkR::getURLs" returned, "Showing 0 to 0 of 0 entries".[5]
RDocumentation[16] 2010s Includes "Top 5 packages", "Top 5 authors", and "Newest packages" on CRAN, BioConductor and Github. Invites users to contribute (a) new examples and (b) ideas and code for further development on their github site.[17] Searching for "base" on 2018-02-28 returned, "500 /n Internal Server Error /n Something isn't right here." Searching for "base::readLines" gave me something useful -- including a URL (Uniform Resource Locator) that I could use in an R Markdown vignette. Similar searches for other packages and functions seemed to produce something useful. This seems to create a strong preference form RDocumentation over other options, especially since Metacran, crantastic, and CRANsearcher all failed to return anything useful for this request. When this fails, try Rseek.[5]
depsy[18] 2012[19] Text-mines papers for mentions of software they use, revealing impacts invisible to citation indexes like Google Scholar. Also analyzes code from over half a million GitHub repositories to find how packages are reused by other software projects and assigns fractional credit to contributors based on designated authorship, number of commits, and repo ownership.[20] Searching for "base" or "readLines", "base::readLines", "getURLs" and "vkR::getURLs" nothing.[5][21] 2016 An index of R packages and documentation from CRAN, Bioconductor, GitHub and R-Forge by Ian Howson. The site allows to run R code only "Snippets Run R code online. Over 9,000 packages are preinstalled!" (The coverage may be nearly comprehensive. However, as of 2018-02-26, the "Ecdat" package that has been on CRAN was not found in ''.)

Questions to be considered in a proposal for improvementEdit

Key questions from this comparison:

  • Might it be worth the effort to build a common database and search engine used by all with different defaults and options tailorable by users? The R Foundation might be able to fund something like this if the concept were sufficiently well defined and there were sufficient demand.
  • One of the simplest parts of such a system might be to share the user reviews between crantastic and CRANsearcher.
  • What might people want done with download statistics?
  • Task Views might include user ratings and download statistics.
  • Offer users the option of having R monitor their usage of different packages and reporting that back to R Core and the package maintainers: Data could be available on which packages were tried, how long each was used, what errors were reported, and what package was used next. Data like these could be used to identify users switching between different related packages. For example, I recently tried gnumeric and quickly switched to readODS when I found that gnumeric required other software that I did not seem to have. Maintainers of gnumeric and readODS might be able to use information like this to improve both packages. Analyses of such data might be portrayed in a network diagram. Such a system would also allow users to turn this feature off and on at any time.

These notes are being published on Wikiversity to invite anyone to add their own thoughts, either directly in this article or in the associated “Discuss” page.

Now it's your turn, dear reader: What would you like to see in a search capability for R?

These notes are posted on Wikiversity precisely to invite others to edit them directly or add comments on the associated “Discuss” page.


This discussion and the accompanying Draft Proposal for improving the ability of R users to search R packages were inspired by the plenary session on "Navigating the R package universe" in the international useR!2017 conference in Brussels, Belgium, July 4-7, 2017.

See alsoEdit



  1. Nash, John, University of Ottowa, 
  2. 2.0 2.1 Graves, Spencer; Sundar, Dorai-Raj; François, Romain (December 2009), "sos: Searching Help Pages of R Packages", R Journal (R Project for Statistical Computing) 1 (2), 
  3. Silge (2017)
  4. Getting Help with R, R Foundation, 
  5. 5.00 5.01 5.02 5.03 5.04 5.05 5.06 5.07 5.08 5.09 5.10 5.11 2018-03-12
  6. R Site Search, Jonathan Baron, Department of Psychology, School of Arts and Sciences (which provides this computer), University of Pennsylvania, 
  7. Rseek, Sasha Goodman, 
  8. <<Citation | title = Nabble R Forum | publisher = Nabble | url = | accessdate = 2018-03-12}}
  9. Google, Google, 
  10. RSiteSearch: Search for Key Words or Phrases in Documentation, RDocumentation, 
  11. sos: Search Contributed R Packages, Sort by Package, RDocumentation, 
  12. METACRAN: Search and browse all CRAN/R packages, 
  13. metacran: Tools for a better CRAN experience, METACRAN, 
  14. Wickham, Hadley; Mæland, Bjørn, Welcome to crantastic, a community site for R packages where you can search for, review and tag CRAN packages., R Foundation, 
  15. CRANsearcher: RStudio Addin for Searching Packages in CRAN Database Based on Keywords, RStudio, 
  16. RDocumentation: Search all 14,381 CRAN, BioConductor and Github packages., DataCamp, 
  17. The web application running, DataCamp, 
  18. Credit when software is informally cited, Depsy, 
  19. About Impactstory, Impactstory, 
  20. Dalmeet Singh Chawla (2016-01-04), "The unsung heroes of scientific software: Creators of computer programs that underpin experiments don’t always get their due — so the website Depsy is trying to track the impact of research code.", Nature 529 (7584), 
  21. Ian Howson