Alex Rivera | Logout

Best way to search for R packages?

Asked 2009-09-08T17:19:57.380
41

Related question

how to search for r materials

Part of the reason why the R community has been attracted to a tag based service like StackOverflow, I think, is that information on R is fundamentally difficult to find online. Services like RSeek have made this slightly less painful, however, I often find the search results scattered.

Specifically, I am often curious if R packages exist to meet a specific need I am facing. RSeek is useful for finding package documentation, but not for discovering new packages---and the R package manager is even less useful. As such, what are some best practices for searching for packages? That is, when I realize I have a need that my current set of R packages will not meet, and before creating the functionality myself I would like to search for a package that will meet the need. What is the best way to proceed?

Edit
Report

1 Answer

26

First, use help.search() or the shorthand ??. This will search the help files of installed packages. I often find I have a package installed that does what I want; I just haven't used it before.

Next, use the findFn function in the sos package. This function searches the help pages of packages covered by the RSiteSearch archives (which includes all packages on CRAN). These are ordered based on a relevance score, so the top few packages on the list are probably the most useful.

To look even further afield, use RSiteSearch() which will send your search to R site search. As well as CRAN packages, this covers the R-help mailing list archives, help pages, vignettes and task views.

Still no luck? Try Rseek.org. It covers more sites.

Finally, if all else fails, ask here on StackOverflow or send your question to the R-help mailing list.

answered 2009-09-13T11:28:27.193

Your Answer