Skip to content
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

object.size.reduce #27

Merged
merged 9 commits into from
Mar 21, 2023
Merged

object.size.reduce #27

merged 9 commits into from
Mar 21, 2023

Conversation

baumbuddy
Copy link
Contributor

The MCMC-list provided by the output of runjags can easily become huge in terms of bytes. It is therefore not prudent to have that list appear twice in the return output of these functions (once as "Sampling" and once as "mcmc" inside "runjags_object").

I therefore set "mcmc" of "runjags_object" to a string pointing to where is "Sampling" is. If input is a BayLum.list (output of these functions and therefore not a generated DataFile), "mcmc" inside "runjags_object" takes on "Sampling" as its value.

Required input to extend JAGS-model is no longer class "runjags" but instead class "BayLum.list".
The MCMC-list of runjags_object (one output of AgeS_Computation) was stripped to save space (The MCMC-list appears already in the first level of the output as "Sample")
Required input to extend JAGS-model is no longer class "runjags" but instead class "BayLum.list".
The MCMC-list of runjags_object (one output of AgeS_Computation) was stripped to save space (The MCMC-list appears already in the first level of the output as "Sampling")
It is "Sampling", not "Sample".
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Merging #27 (29fb5b0) into master (140a715) will decrease coverage by 0.04%.
The diff coverage is 17.64%.

❗ Current head 29fb5b0 differs from pull request most recent head cf44803. Consider uploading reports for the commit cf44803 to get more accurate results

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
- Coverage   68.55%   68.51%   -0.04%     
==========================================
  Files          18       18              
  Lines        2194     2198       +4     
==========================================
+ Hits         1504     1506       +2     
- Misses        690      692       +2     
Impacted Files Coverage Δ
R/Age_OSLC14.R 62.68% <13.04%> (-0.07%) ⬇️
R/AgeS_Computation.R 81.84% <27.27%> (-0.19%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@RLumSK RLumSK self-assigned this Mar 11, 2023
@RLumSK RLumSK added the refactoring Code refactoring towards general improvements label Mar 11, 2023
Copy link
Collaborator

@RLumSK RLumSK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the two minor comments, then I can merge the PR

@@ -13,7 +13,7 @@
#' \code{DATA} contains informations for more than one sample.
#' If there is stratigraphic relations between samples, informations in DATA must be ordered by order of increasing ages.
#' See the details section to for more informations.
#' (2): An object of class "runjags" which is provided by the output of [AgeS_Computation]. When input of class "runjags" is identified, no new JAGS model is created. Instead, the JAGS model specified by the "runjags" object is extended. Useful for when convergence was not originally achieved and a complete restart is not desirable.
#' (2): An object of class "BayLum.list" which is provided by the output of [AgeS_Computation]. When input of class "BayLum.list" is identified, no new JAGS model is created. Instead, the JAGS model specified by the AgeS_Computation output is extended. Useful for when convergence was not originally achieved and a complete restart is not desirable.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use markdown syntax:

  • "BayLum.list" -> `BayLum.list`
  • AgeS_Computation -> [AgeS_Computation]

The first renders the term correctly in the manual, and the second links to the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

R/Age_OSLC14.R Outdated
@@ -15,7 +15,7 @@
#' \code{DATA} contains information for more than one sample.
#' If there is stratigraphic relations between samples, informations in DATA must be ordered by order of
#' increasing ages. See the details section to for more informations.
#' (2): an object of class "runjags" which is provided by the output of [Age_OSLC14]. When input of class "runjags" is identified, no new JAGS model is created. Instead, the JAGS model specified by the "runjags" object is extended. Useful for when convergence was not originally achieved and a complete restart is not desirable.
#' (2): an object of class "BayLum.list" which is provided by the output of [Age_OSLC14]. When input of class "BayLum.list" is identified, no new JAGS model is created. Instead, the JAGS model specified within the BayLum.list is extended. Useful for when convergence was not originally achieved and a complete restart is not desirable.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as before, please use markdown syntax:

  • "BayLum.list" -> `BayLum.list`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@RLumSK
Copy link
Collaborator

RLumSK commented Mar 11, 2023

@imgoej I forgot, please also create a NEWS entry in NEWS.Rmd and then render it with RLumBuild::module_knit_README().

@RLumSK
Copy link
Collaborator

RLumSK commented Mar 21, 2023

@imgoej Thanks!

@RLumSK RLumSK merged commit a2c197c into crp2a:master Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring towards general improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants