-
Notifications
You must be signed in to change notification settings - Fork 234
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
fixed some global variables in PEcAn.MA package #2965
fixed some global variables in PEcAn.MA package #2965
Conversation
Co-authored-by: Chris Black <[email protected]>
Co-authored-by: Chris Black <[email protected]>
Co-authored-by: Chris Black <[email protected]>
Co-authored-by: Chris Black <[email protected]>
Merge branch 'meta_analysis' of https://github.com/nanu1605/pecan into meta_analysis
Co-authored-by: Chris Black <[email protected]>
Edit: I take it back. Since this branch contains ALL the changes from #2956 and #2963, we can resolve this cleanly by merging this PR (once it passes CI) and closing the other two. |
Co-authored-by: Chris Black <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great!
- most important thing would be to add a comment about how and why new.env is being used
- consider not exporting the p.point.in.prior function
@@ -235,15 +242,12 @@ runModule.run.meta.analysis <- function(settings) { | |||
##' | |||
##' used to compare data to prior, meta analysis posterior to prior | |||
##' @title find quantile of point within prior distribution | |||
##' @param point | |||
##' @param point quantile of given prior to return | |||
##' @param prior list of distn, parama, paramb | |||
##' @return result of p<distn>(point, parama, paramb) | |||
##' @export p.point.in.prior |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
##' @export p.point.in.prior |
I think this will at least make it an unexported function, which is appropriate since it isn't particularly useful outside of the one place in run.meta.analysis where it is used:
p.data <- p.point.in.prior(point = data.median, prior = prior) |
FYI if you replaced this line in run.meta.analysis with
p.data <- do.call(paste0("p", prior[['distn']]),
list(point, prior[['parama']], prior[['paramb']]))
and deleted the test of this function I think that would be fine. This isn't necessary, but something to keep an eye out for useless functions that are my legacy from PEcAn v 0.1, and that could make everyone's life easier by not exporting, and perhaps deprecating and merging with existing code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I will do the changes and commit ASAP.
Co-authored-by: David LeBauer <[email protected]>
Co-authored-by: David LeBauer <[email protected]>
Co-authored-by: David LeBauer <[email protected]>
Co-authored-by: David LeBauer <[email protected]>
No description provided.