Rev 56503 | Rev 64657 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/base/man/ns-dblcolon.Rd% Part of the R package, http://www.R-project.org% Copyright 1995-2011 R Core Team% Distributed under GPL 2 or later\name{ns-dblcolon}\title{Double Colon and Triple Colon Operators}\alias{::}\alias{:::}\description{Accessing exported and internal variables in a namespace.}\usage{pkg::namepkg:::name}\arguments{\item{pkg}{package name: symbol or literal character string.}\item{name}{variable name: symbol or literal character string.}}\details{For a package \pkg{pkg}, \code{pkg::name} returns the value ofthe exported variable \code{name} in namespace \code{pkg}, whereas\code{pkg:::name} returns the value of the internal variable\code{name}. The namespace will be loaded if it was not loadedbefore the call, but the package will not be attached to thesearch path.Specifying a variable or package that does not exist is an error.Note that \code{pkg::name} does \strong{not} access the objects in theenvironment \code{package:pkg} (which does not exist until thepackage's namespace is attached): the latter may contain objects notexported from the namespace. As from \R 2.14.0 it can access datasetsmade available by lazy-loading.}\note{It is typically a design mistake to use \code{:::}in your code since the corresponding object has probably been keptinternal for a good reason. Consider contacting the packagemaintainer if you feel the need to access the object for anything butmere inspection.}\seealso{\code{\link{get}} to access an object masked by another of the same name.}\examples{base::logbase::"+"## Beware -- use ':::' at your own risk! (see "Details")stats:::coef.default}\keyword{programming}