You are here

Name space implemented

1 post / 0 new
mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
Name space implemented

As of r1033 in the repository, the OpenMx package has its own name space when it is loaded in R. This is the "right" way to publish packages in R, and we intended to add a name space some time ago. But the namespace mechanics are scary and poorly documented.

Now the following names are exported to the user:

  • Any function of the form: mx***()
  • Any function of the form: omx***()
  • Matrix functions implemented in the library: tr, "%&%", vech, vechs
  • S4 operators: "[","[[", "$"
  • S4 methods: summary, nrow, ncol, length, dimnames, show, print

I believe I exported all the necessary names to the user. The test suite is passing with no errors. If we forgot to export something, please let us know.

Exported names by default are locked, which means you can't change the value stored by those variables. This can be circumvented using unlockBinding('foo', getNamespace("OpenMx")). I don't recommend doing it.