[R] Managing global/local variables when creating R packages

2007-08-02 Thread Bethany Kok
I'm working on a package for R to create graphs for modeling interactions between latent variables in SEM. At the moment, I have one function which performs the necessary steps to prepare the data for graphing, and then separate graphing functions depending on what graph type (or types) the

Re: [R] Managing global/local variables when creating R packages

2007-08-02 Thread Gabor Grothendieck
1. This probably translates best from what you have. It places the object in the package space itself. The lattice package illustrates that. Download the lattice package code from CRAN and look at .LatticeEnv defined in zzz.R there. Also try this: library(lattice) lattice:::.LatticeEnv

Re: [R] Managing global/local variables when creating R packages

2007-08-02 Thread Prof Brian Ripley
On Thu, 2 Aug 2007, Bethany Kok wrote: I'm working on a package for R to create graphs for modeling interactions between latent variables in SEM. At the moment, I have one function which performs the necessary steps to prepare the data for graphing, and then separate graphing functions