Skip to content
Prev 7478 / 12125 Next

[R-pkg-devel] Is there a better way ...?

On Thu, Oct 21, 2021 at 9:59 AM Rolf Turner <r.turner at auckland.ac.nz> wrote:
Why not have a private (unexported) environment in your own package
for the same purpose? (That's the strategy used by lattice.) E.g., in
your zzz.R

.FooEnv <- new.env()

and then have your plot.foo write into / read from that. Long term, it
may be better to write accessor functions (which can still be
unexported if only used by your package code) if you want an
implementation-agnostic interface.

Best,
-Deepayan