ns-dblcolon {base} | R Documentation

## Double Colon and Triple Colon Operators

### Description

Accessing exported and internal variables in a name space.

### Usage

    pkg::name
    pkg:::name

### Arguments

`pkg` | package name symbol or literal character string.
`name` | variable name symbol or literal character string.

### Details

The expression `pkg::name` returns the value of the exported variable `name` in package `pkg` if the package has a name space. The expression `pkg:::name` returns the value of the internal variable `name` in package `pkg` if the package has a name space. The package will be loaded if it was not loaded already before the call. Assignment into name spaces is not supported.

Note that it is typically a design mistake to use `:::` in your code since the corresponding object has probably been kept namespace-internal for a good reason. Consider contacting the package maintainer if you feel the need to access the object for anything but mere inspection.

If the package `pkg` does not have a name space but is on the search path then `pkg::name` returns the value of `name` in the package environment.

### See Also

`get` to access an object masked by another of the same name.

### Examples

    base::log
    base::"+"

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

[Package base version 2.8.1 Index]