knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The sos
package provides the fastest literature search I know for anything statistical. It queries the RSiteSearch
database and sorts the results by package not just help page. The package includes a vignette reprinted from The R Journal.
You can install the released version of sos from CRAN with:
install.packages("sos")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("sbgraves237/sos")
This is a basic example which shows you how to solve a common problem:
library(sos) (PL <- findFn('Petal.Length'))
The print
method for an object of class findFn
, like PL
, opens two tabs in the default browser: The first has links to individual help pages sorted by package. The second is a package summary.
The current version of sos
extracts some information only from installed packages. You can install the leading packages in a search as follows:
installPackages(PL)
PL
For more see the companion vignette, which appeared as Spencer Graves, Sundar Dorai-Raj and Romain François, "sos: Searching Help Pages of R Packages", The R Journal, 1(2)56-59.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.