The R Project SVN R

Rev

Rev 88585 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

% File src/library/base/man/search.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2025 R Core Team
% Distributed under GPL 2 or later

\name{search}
\title{Give Search Path for R Objects}
\alias{search}
\alias{searchpaths}
\usage{
search()
searchpaths()
}
\description{
  Gives a list of \code{\link{attach}}ed \emph{packages}
  (see \code{\link{library}}), and \R objects, usually
  \code{\link{data.frame}s}.
}
\value{
  A character vector, starting with \code{"\link{.GlobalEnv}"}, and
  ending with \code{"package:base"} which is \R's \pkg{base} package
  required always.

  \code{searchpaths} gives a similar character vector, with the
  entries for packages being the path to the directory from which the
  namespace was loaded.
}
\references{
  \bibshow{R:Becker+Chambers+Wilks:1988}  (\code{search}.)

  \bibshow{R:Chambers:1998}  (\code{searchpaths}.)
}
\seealso{
  \code{\link{.packages}} to list just the packages on the search path,
  and \code{\link{path.package}} for the associated directories.

  \code{\link{loadedNamespaces}} to list loaded namespaces.

  \code{\link{attach}} and \code{\link{detach}} to change the
  search path, \code{\link{objects}} to find \R objects in there.
}
\examples{
search()
searchpaths()
}
\keyword{data}