Search code examples
rsyntax

What does the symbol ::: mean in R


I came across this in the following context from B. Pfaff's "Analysis of Integrated and Cointegrated Time Series in R"

## Impulse response analysis of SVAR A−type model 1
args (vars ::: irf.svarest) 2
irf.svara <− irf (svar.A, impulse = ”y1 ” , 3
response = ”y2 ” , boot = FALSE) 4
args (vars ::: plot.varirf) 5
plot (irf.svara)

Solution

  • From the help file (you can see this with help(":::")):

    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.
    

    In other words ::: is used to directly access a member of a package that is internal (i.e. not exported from the NAMESPACE).

    See this related question: R: calling a function from a namespace.