Reproducibility problems with Rmarkdown and Renv
问题 I recently noticed that the same R markdown document was generating different plots when being run in different conditions (eg. different projects). As a toy example, consider the following document: --- title: "Example" output: html_document --- ```{r plot, warning=FALSE, echo=FALSE} library("tidyverse") tibble(mu = c(-9.4, -9.3, -9.2, -9, -8.9, -8.8, -8.7, -8.5, -8.4, -8.3, 0), N = c(1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 3)) %>% ggplot() + geom_point(aes(x=mu, y=N)) + geom_bar(aes(x=mu, y=N), stat=