swcarpentry/r-novice-inflammation — pull request #5 by gvwilson (2014-12-20 14:01:27+00:00)
Title: Putting commands to build R in the main Makefile.

This doesn't work: after installing knitr with:

~~~
install.packages("knitr")
install.packages("markdown")
~~~

the command `make preview` produces:

~~~
~/lessons/r-novice-inflammation: make preview
pandoc -s -t html \
--template=_layouts/page \
--filter=tools/filters/blockquote2div.py \
--filter=tools/filters/id4glossary.py \
-Vheader="$(cat _includes/header.html)" -Vbanner="$(cat _includes/banner.html)" -Vfooter="$(cat _includes/footer.html)" -Vjavascript="$(cat _includes/javascript.html)" \
-o 00-first-timers.html 00-first-timers.md
Rscript -e "knitr::knit('$(basename 01-starting-with-data.Rmd)', output = '$(basename 01-starting-with-data.md)')"

processing file: 01-starting-with-data.Rmd
|. | 2%
ordinary text without R code

|.. | 4%
label: unnamed-chunk-1 (with options)
List of 1
$ include: logi FALSE

Quitting from lines 7-9 (01-starting-with-data.Rmd)
Error in file(filename, "r", encoding = encoding) :
cannot open the connection
Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> source -> file

Execution halted
make: *** [01-starting-with-data.md] Error 1
~~~