I'm trying to produce randomized questionnaires using Rmarkdown and knitr. However each time I run the script I get exactly the same result.
This is the code I'm using.
```{r,echo=FALSE,results='asis',warning=FALSE,cache=FALSE}
print(sample(1:10))
```
Is there a way of getting always a different result? It seems that the random seed is fixed and that it does not change at each line.
Thanks a lot.
Aucun commentaire:
Enregistrer un commentaire