Skip to content
Prev 1163 / 12125 Next

[R-pkg-devel] environment scoping

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