Good day all -
I am looking for a way to embed the fix() function within a script. Basically, here's what I'm currently doing:
- I load a certain package. For example, "library(PerformanceAnalytics)"
- I call the "fix()" function to edit a couple functions within the loaded package. Example, "fix(VaR)".
- Then, using R's built-in editor, I copy-paste my function over the one originally loaded from the package.
- Finally, I source in my .R script which calls the above functions I "fixed" and performs the computations I need.
Essentially, I'd like to streamline Step 3 above. Rather than having to manually type "fix(function)" and copy-paste over the original functions within the loaded package, I'd rather just have it done within a script I source.
Is there anyway to accomplish this?
FYI, I have reached out to the package's creator and loading a re-compiled version of the package with my modified code is out of the question.
Thanks in advance for the help--much appreciated!!