I'm creating a document in a Rmarkdown
file and knitting to HTML for file submission. Generating seeded samples using the sample function provide different results in the console and the knitted file.
I am using R Studio version 1.0.153 and R 3.6.0
edit: I have updated R Studio to version 1.2.1335 and am still having this issue
set.seed(1)
rnorm(1)
sample(1:10, 1)
in the console and knitted file, the value for rnorm(1)
is the same, however, in the console, I see that I have sampled 6 in the console, and 7 in the knitted document