apropos {utils}R Documentation

Find Objects by (Partial) Name


apropos() returns a character vector giving the names of all objects in the search list matching what.

find() is a different user interface to the same task.


apropos(what, where = FALSE, ignore.case = TRUE, mode = "any")

find(what, mode = "any", numeric. = FALSE, simple.words = TRUE)


what character string with name of an object, or more generally a regular expression to match against.
where, numeric. a logical indicating whether positions in the search list should also be returned
ignore.case logical indicating if the search should be case-insensitive, TRUE by default. Note that in R versions prior to 2.5.0, the default was implicitly ignore.case = FALSE.
mode character; if not "any", only objects whose mode equals mode are searched.
simple.words logical; if TRUE, the what argument is only searched as whole word.


If mode != "any" only those objects which are of mode mode are considered. If where is TRUE, the positions in the search list are returned as the names attribute.

find is a different user interface for the same task as apropos. However, by default (simple.words == TRUE), only full words are searched with grep(fixed = TRUE).

Note that in R versions prior to 2.5.0, what was allowed to be non-character, such that find(cor) worked as it does in S. This possibility has been dropped in line with the aim of minimizing all use of non-standard evaluation in R.


Kurt Hornik and Martin Maechler (May 1997).

See Also

glob2rx to convert wildcard patterns to regular expressions.

objects for listing objects from one place, help.search for searching the help system, search for the search path.


## Not run: apropos("lm")
apropos("GLM")                      # more than a dozen
apropos("GLM", ignore.case = FALSE) # not one

cor <- 1:pi
find("cor")        #> ".GlobalEnv"   "package:stats"
find("cor", num=TRUE) # numbers with these names
find("cor", num=TRUE, mode="function")# only the second one

## Not run: apropos(".", mode="list") # a long list

# need a DOUBLE backslash '\\' (in case you don't see it anymore)

## Not run: # everything 

# those starting with 'pr'

# the 1-letter things
# the 1-2-letter things
# the 2-to-4 letter things

# the 8-and-more letter things
## End(Not run)

[Package utils version 2.5.0 Index]