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

improve docs re: set.seed and reproducibility #417

Merged
merged 4 commits into from
Sep 7, 2021
Merged

Conversation

simonpcouch
Copy link
Collaborator

This PR adds a section to the docs for generate and functions used after generate()ing about reproducibility when resampling! Notes that infer respects the state of the RNG and provides an example of how to reproduce exact results.

Worth mentioning that this PR doesn't introduce a more integrated solution to setting the RNG seed, as @kellieotto suggested in #416. I think this avoids introducing an additional layer of abstraction for RNGs (which I find tricky, personally?), though am open to discuss further if folks feel this might be worthwhile.

Closes #416.

@echasnovski
Copy link
Collaborator

I don't see as reasonable integrating any sort of randomness management into function arguments. The most adopted way of R community to manage randomness is with set.seed(). Its extra documentation should be enough.

@andrewpbray
Copy link
Collaborator

I agree. Thanks for pulling this together Simon!

Copy link
Collaborator

@mine-cetinkaya-rundel mine-cetinkaya-rundel left a comment

Choose a reason for hiding this comment

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

This looks good, just a minor wording suggestion.

An additional place this sort of information could go to is the "Getting to know you" vignette, right around the first appearance of the example including generate(). Much of the same language can be reused there and it can be a good place to draw the users' attention to the importance of setting a seed for reproducibility, without making it a required argument in generate().

man-roxygen/seeds.Rmd Outdated Show resolved Hide resolved
@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[JOSS Review] Random seeds for reproducibility
4 participants