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

Preserve state of random number generator #92

Merged
merged 1 commit into from Mar 12, 2024

Conversation

TimTaylor
Copy link
Contributor

@TimTaylor TimTaylor commented Mar 12, 2024

Per #91 this PR preserves the seed of the random number generator on package attachment.

This does add {withr} as a hard dependency. Whilst I think we could avoid this (maybe setting .Random.seed back on.exit is sufficient), {withr} is lightweight and well tested so I erred towards using it rather than missing something subtle.

@TimTaylor TimTaylor changed the title FIX: preserve state of random number generator Preserve state of random number generator Mar 12, 2024
@kevinushey kevinushey merged commit 7a8fb36 into r-lib:main Mar 12, 2024
7 checks passed
@kevinushey
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants