I'm trying to use sample_n to randomly select some rows from a dataframe, but want these to be reproducible (at least for now), so I'm using set.seed, but I can't get reproducible selections from my dataframe or something simpler like a vector using sample. Am I missing something? I know there was recent changes in v3.6.0 to how sampling works but FWIW I'm on v3.5.2
So that leads to another question: is there a way to set set.seed globally? I'm currently working with bookdown and would like to be able to define set.seed once for multiple .Rmd files...
I think this question is sufficiently different that you should start a new thread. It should probably go either in General or R Markdown, since it's not directly related to the tidyverse.