ID EN
Miscellaneous

ns-dblcolon

R Base 3.6.2

Accessing exported and internal variables, i.e.R objects (including lazy loaded data sets) in a namespace.

Syntax

R
pkg::name
pkg:::name

Arguments

Parameter Description
pkg package name: symbol or literal character string.
name variable name: symbol or literal character string.

Details

For a package pkg, pkg::name returns the value of the exported variable name in namespace pkg, whereas pkg:::name returns the value of the internal variable name. The package namespace will be loaded if it was not loaded before the call, but the package will not be attached to the search path. Specifying a variable or package that does not exist is an error. Note that pkg::name does not access the objects in the environment package:pkg (which does not exist until the package's namespace is attached): the latter may contain objects not exported from the namespace. It can access datasets made available by lazy-loading.

Examples

Example
R
# NOT RUN {
base::log
base::"+"

## Beware --  use ':::' at your own risk! (see "Details")
stats:::coef.default
# }

See Also

get to access an object masked by another of the same name. loadNamespace asNamespace for more about namespaces.