Re: [R-pkg-devel] environment scoping

2016-10-27 Thread William Dunlap
If I were writing a package for factoring integers I might store a vector of known primes in an environment in my package and have my factoring functions append to the list when they find some more primes. This works because there is only one set of of primes (given we stick with ordinary

Re: [R-pkg-devel] environment scoping

2016-10-27 Thread Jenny Bryan
Hi Glenn, It sounds like you should create an environment for your package. If you store these objects in the global environment, they are exposed to the user and, more importantly, user could modify or delete them. If you use an environment specific to your package, you can be sure you are