-
Notifications
You must be signed in to change notification settings - Fork 14
Typeset Code Chunks
R code chunks have their own environment (Noweb) which gets detected on the Knitr run. The code inside the chunks is then validated via R. The box below shows an example code chunk. In the header a name and options which influence the handling of the chunk content and the output to the LaTeX document can be set.
<<name, options>>=
Your R code here!
@
Several Knitr options are already set globally for the Open-Science-Paper.
These options you can find in usr/subdocuments/options/osp_global_knitr_options.Rnw file.
You can simply overwrite an option locally for a single code chunk by setting
it to another value in the chunk header. To change it globally change the
options in the global options file. For an overview about other Knitr options I
would recommend to read the package documentation or to visit the authors
homepage.
- If you spot a typo, feel free to edit the wiki directly
- If you don't understand something, please email ctpfaff
- If you have have a longer contribution, please contact me first
Installation
Structure and Files
Typesetting
- The title header
- The footer
- Sectioning
- Lists
- Citations
- Figures
- Tables
- Math
- Code chunks
- Code listings
Workflow