New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Location of functions for root solving [lower priority] #235
Comments
Following the discussion today: the reason that the inner function is harder to move outside the outer function: the inner function is using variables outside of it's scope but within the outer function's scope. To move it out, additional arguments need to be added. |
Removed my assignment as no short-term plan to complete it. |
@jdblischak do you mind helping with this when you got some time? Not urgent. The goal is to move the inline functions Line 110 in 24fdc77
Line 194 in 4917d25
They are used in This would drastically improve the rigorousness of these functions, because currently they used variables not defined in the function signature, thus R will search for those variables in upper level environments, which is considered dangerous. Defining them outside would enforce all invoked variables properly defined in the function signature. This would also avoid these being repeatedly redefined every time the upper-level functions are called which can be a performance hog. |
I'm a bit more cautious about Line 26 in 59e8a03
Line 225 in 59e8a03
However, as a quick test, I deleted the |
So Then it would be important to check in with the original author about the intention. Since In general, it's worthwhile to review the call chain in |
Hey @elong0527 I can't recall who wrote this part, could you point us to the author to clarify the |
I guess I am the author, agree we should avoid The intention is to use |
I confirmed that currently the library("gsDesign2")
debugonce(mvtnorm::pmvnorm)
gs_design_combo(seed = 1)
Browse[2]> print(seed)
NULL |
However, this was easily fixed by adding library("gsDesign2")
debugonce(mvtnorm::pmvnorm)
gs_design_combo(seed = 1)
Browse[2]> print(seed)
[1] 1 |
A quick note on our discussion today: we agreed that it's important to keep those
|
- require npsurvSS >= 1.1.0 in description file
Place to discuss comments in #229
The text was updated successfully, but these errors were encountered: