-
Notifications
You must be signed in to change notification settings - Fork 1
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
things to fix before resubmitting to CRAN #44
Conversation
Here's the relevant code: # based on https://stat.ethz.ch/pipermail/r-help/2007-September/141717.html
if (!exists(".Random.seed")) stats::runif(1)
trace$seed <- list(.Random.seed) I personally do not think this qualifies as setting a seed; however I agree that this is not an idiomatic code. @klmr @banfai @ingitwetrust what's your suggestions? the path of least resistance is just removing this. |
427235c
to
dc3db6a
Compare
a8a0774
to
12dfe92
Compare
Without prior knowledge of the structure it isn’t obvious to me what the purpose of If the purpose is reproducibility, it should be sufficient to replace the code in question with
This will assign And note that it’s not sufficient to store the random seed to get full reproducibility, we also need to store the RNG kind and version. |
Oops, the previous comment is nonsense: storing There doesn’t seem to be an idiomatic way of seeding the RNG with a good random number using if (!exists(".Random.seed")) {
# Explicitly set the default RNG in order to seed it with a random value that we can store.
do.call(RNGkind, as.list(RNGkind()))
} (Actually the documentation is incorrect because it implies that |
thanks, @klmr. I updated the code to save RNG kind and I do not use side-effects of could you please review? |
Facilitate experiment design... |
Co-authored-by: Balazs Banfai <[email protected]>
hi @klmr, I think it's ready for review now. @ingitwetrust regarding design of experiment, I forgot but it's in the title. so should be quite findable. |
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.
LGTM!
While working on this I removed
R/randomization.R
; we have several unexported functions which were responsible for most of the warnings. We can later recover the file if needed.