Reproducible-Science-Curriculum / rr-init

Research project initialization and organization following reproducible research guidelines
Creative Commons Zero v1.0 Universal
82 stars 53 forks source link

Output directory for knitr can only be set as function argument #2

Open hlapp opened 9 years ago

hlapp commented 9 years ago

If we want the top-level .Rmd file to be rendered to the doc/paper directory, then this output directory needs to be configurable as an option. However, apparently it isn't; only the directory for figure output can be set. This means that rendering the Markdown, HTML, LaTeX, and PDF versions need to be executed as rmarkdown::render() so that the output path can be passed as an argument. That the "Knit HTML" button is not to be used is likely rather undesirable for practical use and teaching purposes.

cboettig commented 9 years ago

Very good point. I don't use the button that frequently and had forgotten this could only be done in function calls. Given the prevalence of the RStudio button the inability to set this as a configuration feels more like a knitr bug to me, see https://github.com/yihui/knitr/issues/913