mjskay / tidybayes

Bayesian analysis + tidy data + geoms (R package)
http://mjskay.github.io/tidybayes
GNU General Public License v3.0
710 stars 59 forks source link

Set seed in sample_draws #274

Closed JackCaster closed 3 years ago

JackCaster commented 3 years ago

I would like to set the seed in sample_draws to make the sampling reproducible.

I believe we could add set.seed(SEED) right before https://github.com/mjskay/tidybayes/blob/17f4dc68b2ac7a077b5570adf7fd8f5c3ac91ce5/R/sample_draws.R#L61

Would this be a good addition to the package?

mjskay commented 3 years ago

Yeah that would be helpful, using a seed parameter similar to that in predicted_draws(). If you're interested in making a pull request for the change I'd be fine with that!

JackCaster commented 3 years ago

Sounds good. I'll have a look over the weekend