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

Address CRAN review issues #23

Closed
17 of 27 tasks
wleoncio opened this issue Apr 25, 2024 · 1 comment
Closed
17 of 27 tasks

Address CRAN review issues #23

wleoncio opened this issue Apr 25, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@wleoncio
Copy link
Member

wleoncio commented Apr 25, 2024

Slightly-adapted reviewer comments:

  • Please reduce the length of the title to less than 65 characters.
  • Please write references in the description of the DESCRIPTION file in the form authors (year) doi:... (If you want to add a title as well please put it in quotes: "Title") So please add the (year) for the last two references as well.
  • Please always explain all acronyms in the description text. -> (R)(G)MJMCMC
  • Please write TRUE and FALSE instead of T and F.
  •  Please don't use "T" or "F" as vector names. 'T' and 'F' instead of TRUE and FALSE e.g. in: man/runemjmcmc.Rd: runemjmcmc()
  •  \dontrun{} should only be used if the example really cannot be executed (e.g. because of missing additional software, missing API keys, ...) by the user. That's why wrapping examples in \dontrun{} adds the comment ("# Not run:") as a warning for the user. Does not seem necessary. Please replace \dontrun with \donttest.
  •  Please unwrap the examples if they are executable in < 5 sec, or replace dontrun{} with \donttest{}.
  •  Please ensure that your functions do not write by default or in your examples/vignettes/tests in the user's home filespace (including the package directory and getwd()). This is not allowed by CRAN policies. Please omit any default path in writing functions. In your examples/vignettes/tests you can write to tempdir().
    • R/EMJMCMC2016-method-visualize_results.R
  •  Please make sure that you do not change the user's options, par or working directory. If you really have to do so within functions, please ensure with an immediate call of on.exit() that the settings are reset when the function is exited. See example below.
    •  R/EMJMCMC2016-method-backward_selection.R;
    •  R/EMJMCMC2016-method-forward_selection.R;
    •  R/EMJMCMC2016-method-full_selection.R;
    •  R/EMJMCMC2016-method-learnlocalMCMC.R;
    •  R/EMJMCMC2016-method-learnlocalND.R;
    •  R/EMJMCMC2016-method-learnlocalSA.R;
    • R/runemjmcmc.R
...
oldpar <- par(no.readonly = TRUE) # code line i
on.exit(par(oldpar)) # code line i + 1
...
par(mfrow=c(2,2)) # somewhere after
...

If you're not familiar with the function, please check ?on.exit. This function makes it possible to restore options before exiting a function even if the function breaks. Therefore it needs to be called immediately after the option change within a function.

  •  Please do not modify the global environment (e.g. by using <<-) in your functions. This is not allowed by the CRAN policies.
    •  R/EMJMCMC2016-method-buildmodel.R;
    •  R/EMJMCMC2016-method-calculate.move.logprobabilities.R
    • R/EMJMCMC2016-method-fitmodel.R;
    • EMJMCMC2016-method-forecast.matrix.R;
    • EMJMCMC2016-method-initialize.R;
    • EMJMCMC2016-method-modejumping_mcmc.R;
    • EMJMCMC2016-method-post_proceed_results.R;
    • EMJMCMC2016-method-post_proceed_results_hash.R;
    • R/runemjmcmc.R
@wleoncio
Copy link
Member Author

wleoncio commented May 6, 2024

Package on CRAN. Closing

@wleoncio wleoncio closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants