lesson-example
lesson-example copied to clipboard
Avoid "CRAN without setting a mirror"
trafficstars
Copy http://stackoverflow.com/a/8475208/1802726 as instruction to solve
$ make serve
Loading required package: knitr
Loading required package: stringr
Loading required package: checkpoint
checkpoint: Part of the Reproducible R Toolkit from Microsoft
https://mran.microsoft.com/documents/rro/reproducibility/
Installing missing required packages: ggplot2
Installing package into ‘/home/raniere/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
Error in contrib.url(repos, type) :
trying to use CRAN without setting a mirror
Calls: source ... generate_md_episodes -> install.packages -> grep -> contrib.url
Execution halted
make: *** [Makefile:84: lesson-rmd] Error 1
I don't understand what is being asked for here.
@gvwilson make with fail if I didn't have setup the CRAN mirror that R should use by default (what is the case for Python uses). We should add .Rprofile on this repository to store
options(repos=structure(c(CRAN="https://cran.cnr.berkeley.edu/")))
I'm -1 on setting up a .Rprofile in this repo - lots of our authors will have .Rprofile files of their own. Is there a way to modify the Makefile to:
- make building the .Rmd files optional
- only do the .Rmd-to-.md translation that's actually needed?
Right now, the .Rmd files are always translated (all of them, every time), and I don't understand why.