This page has the following sections:

Forgot function name
Local functionality
Wider searches
Possible blunders

Forgot function name

If you have misplaced the exact name of a function that you want to use, the apropos function might help you. The command:

> apropos("med")

returns the names of objects on the search list that contain the string ”med”.

> apropos("^med")

returns the names of objects on the search list that begin with the string ”med”.

Local functionality

Suppose that you want to ”combine” objects, but you don’t know what function to use to perform your particular task. You might be able to find the right function with:

> ??combine

That command is really a shortcut for:

> help.search("combine")

It searches through pieces of the help files of the packages that are installed on your machine.

Wider searches

This section assumes that you are connected to the internet.

If you are looking for functionality beyond your current installation or looking for something other than functionality, then from within R you can use the RSiteSearch function:

> RSiteSearch("combine")

The same idea as RSiteSearch but better in many people’s eyes is the sos package.

A great search tool of the R world is Rseek:

http://www.rseek.org

If there is a CRAN task view for your domain of interest or for the task in front of you, then by all means explore it.

CRAN Task Views.

Possible blunders

Remember that the search function tells you the items that are on the search list for the current session. It is not for doing searches.

Back to top level of Impatient R

Kommentarer inaktiverade för More R Search

See more

Explore more content and blog posts.

  • jun 25, 26

    Several packages on CRAN provide (or relate to) interfaces between databases and R.  Here is a summary, mostly in the words of the package descriptions.  Remember that package names are [...]

  • jun 25, 26

    Chapter 32 of Tao Te Programming advises you to make bricks instead of monoliths.  Here is an example. The example is written with the syntax of R and is a [...]

  • jun 25, 26

    There is a mechanism that allows variability in the arguments given to R functions.  Technically it is ellipsis, but more commonly called ”…”, dots, dot-dot-dot or three-dots. Basics The three-dots [...]