This is the "sample_n" from dplyr in R.
https://dplyr.tidyverse.org/reference/sample.html
For reproducibility, I should place a seed so that someone else can get my exact results.
Is there a built-in way to set the seed for "sample_n"? Is this something that I do in the environment and "sample_n" responds to it?
These are not built-into the "sample_n" function.
- There is the environment "set.seed" function [1]
- There is a library 'withr' that creates a seed-containing wrapper for code [2]
.