Calling a function from a namespace

Try this:

copula:::asCall

This was previously answered on R-help. That function was not exported in the package namespace, so you need to use the ::: operator instead. Typically functions are not exported when they are not intended for general usage (e.g. you don't need to document them in this case).


When developing, ?assignInNamespace is very useful.

This allows you to inject a new copy of a non-exported function into a package's namespace.

It would be nice if R's error message was more helpful. Instead of:

Error: 'matrixToPaths' is not an exported object from 'namespace:OpenMx'

Why not add:

You might try OpenMx:::matrixToPaths"

Tags:

Namespaces

R