\HeaderA{apropos}{Find Objects by (Partial) Name}{apropos}
\aliasA{find}{apropos}{find}
\keyword{data}{apropos}
\keyword{documentation}{apropos}
\keyword{environment}{apropos}
\begin{Description}\relax
\code{apropos} returns a character vector giving the names of
all objects in the search list matching \code{what}.

\code{find} is a different user interface to the same task as \code{apropos}.
\end{Description}
\begin{Usage}
\begin{verbatim}
apropos(what, where = FALSE, mode = "any")

find(what, mode = "any", numeric. = FALSE, simple.words = TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{what}] name of an object, or \LinkA{regular expression}{regular expression} to match against
\item[\code{where, numeric.}] a logical indicating whether positions in the
search list should also be returned
\item[\code{mode}] character; if not \code{"any"}, only objects who's
\code{\LinkA{mode}{mode}} equals \code{mode} are searched.
\item[\code{simple.words}] logical; if \code{TRUE}, the \code{what} argument is
only searched as whole word.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
If \code{mode != "any"} only those objects which are of mode \code{mode}
are considered.
If \code{where} is \code{TRUE}, the positions in the search list are
returned as the names attribute.

\code{find} is a different user interface for the same task as \code{apropos}.
However, by default (\code{simple.words == TRUE}), only full words are
searched with \code{grep(fixed = TRUE)}.
\end{Details}
\begin{Author}\relax
Kurt Hornik and Martin Maechler (May 1997).
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{objects}{objects}} for listing objects from one place,
\code{\LinkA{help.search}{help.search}} for searching the help system,
\code{\LinkA{search}{search}} for the search path.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Not run: apropos("lm")
apropos(ls)
apropos("lq")

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
rm(cor)

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

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

## Not run: # everything 
length(apropos("."))

# those starting with 'pr'
apropos("^pr")

# the 1-letter things
apropos("^.$")
# the 1-2-letter things
apropos("^..?$")
# the 2-to-4 letter things
apropos("^.{2,4}$")

# the 8-and-more letter things
apropos("^.{8,}$")
table(nchar(apropos("^.{8,}$")))
## End(Not run)\end{ExampleCode}
\end{Examples}

