[R-pkg-devel] environment scoping

Glenn Schultz glennmschultz at me.com
Thu Oct 27 16:05:30 CEST 2016


All,

I would like to have some inputs available to many functions.  For example, I have coefficient for a term structure fit which I would like to make a available to total return functions.  Thereby eliminating the need to fit the same term structure over and over again.  However, I still reading and researching scoping.  My understanding is that I could fit the term structure and keep the coefficients in the global environment which would then make those coefficients available to all functions requiring a term structure object input.  Am I correct in my understanding.  What is the downside of environment global, if any?

Best Regards,
Glenn


More information about the R-package-devel mailing list