

   apropos {base}                               R Documentation

   FFiinndd OObbjjeeccttss bbyy ((PPaarrttiiaall)) NNaammee

   DDeessccrriippttiioonn::

        `apropos' returns a vector of character strings giving
        the names of all objects in the search list matching
        `what'.

        `find' is a different user interface to the same task
        as `apropos'.

   UUssaaggee::

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

   AArrgguummeennttss::

       what: name of an object, or regular expression to match
             against

   where, numeric.: a logical indicating whether positions in
             the search list should also be returned

       mode: character; if not `"any"', only objects who's
             `mode' equals `mode' are searched.

   simple.words: logical; if `TRUE', the `what' argument is
             only searched as whole only word.

   DDeettaaiillss::

        `apropos' returns a vector of character strings giving
        the names of all objects in the search list matching
        `what'.  If `mode != "any"' only those objects which
        are of mode `mode' are considered.  If `where' is
        `TRUE', their position in the search list is returned
        as their names attribute.

        `find' is a different user interface to the same task
        as `apropos'.  However, by default (`simple.words ==
        TRUE'), only full words are searched.

   AAuutthhoorr((ss))::

        Kurt Hornik and Martin Maechler (May 1997).

   SSeeee AAllssoo::

        `objects' for listing objects from one place, `search'
        for the search path.

   EExxaammpplleess::

        apropos("lm")
        apropos(ls)
        apropos("lq")

        lm <- 1:pi
        find(lm)        ##> ".GlobalEnv"   "package:base"
        find(lm, num=T) ## .. numbers with these names
        find(lm, num=T, mode="function")# only the second one
        rm(lm)

        apropos(".", mode="list")

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

        # 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,}$")))

