Skip to content
Prev 22292 / 63421 Next

operator :: and symbols not in the namespace of a package with a namespace (PR#9279)

On 10/6/2006 9:05 AM, thomas.friedrichsmeier at rub.de wrote:
At first I was ready to disagree with you, telling you to use the ":::" 
operator for something that is not exported:  but in fact motor is a 
dataset, so it is exported from the package by being loaded into the 
package environment when the package is loaded.  I agree that the "::" 
operator should find it.

I think the rule should be:  the "::" operator looks at the symbols that 
are publicly available from the package, i.e. boot::motor should 
effectively be an abbreviation for

get("motor", pos="package:boot", inherits=FALSE)

after making sure boot is loaded.  I think getExportedValue() is a much 
more rarely needed function, so users should need to use it explicitly.

Duncan Murdoch