Rev 12778 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{apropos}\title{Find Objects by (Partial) Name}\usage{apropos(what, where = FALSE, mode = "any")find(what, mode = "any", numeric. = FALSE, simple.words = TRUE)}\alias{apropos}\alias{find}\arguments{\item{what}{name of an object, or regular expression to match against}\item{where, numeric.}{a logical indicating whether positions in thesearch list should also be returned}\item{mode}{character; if not \code{"any"}, only objects who's\code{\link{mode}} equals \code{mode} are searched.}\item{simple.words}{logical; if \code{TRUE}, the \code{what} argument isonly searched as whole only word.}}\description{\code{apropos} returns a character vector giving the names ofall objects in the search list matching \code{what}.\code{find} is a different user interface to the same task as \code{apropos}.}\details{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 arereturned as the names attribute.\code{find} is a different user interface to the same task as \code{apropos}.However, by default (\code{simple.words == TRUE}), only full words aresearched.}\author{Kurt Hornik and Martin Maechler (May 1997).}\seealso{\code{\link{objects}} for listing objects from one place,\code{\link{help.search}} for searching the help system,\code{\link{search}} for the search path.}\examples{apropos("lm")apropos(ls)apropos("lq")lm <- 1:pifind(lm) ##> ".GlobalEnv" "package:base"find(lm, num=TRUE) ## .. numbers with these namesfind(lm, num=TRUE, mode="function")# only the second onerm(lm)apropos(".", mode="list")# need a DOUBLE backslash `\\\\' (in case you don't see it anymore)apropos("\\\\[")# everythinglength(apropos("."))# those starting with `pr'apropos("^pr")# the 1-letter thingsapropos("^.$")# the 1-2-letter thingsapropos("^..?$")# the 2-to-4 letter thingsapropos("^.{2,4}$")# the 8-and-more letter thingsapropos("^.{8,}$")table(nchar(apropos("^.{8,}$")))}\keyword{data}\keyword{documentation}\keyword{environment}