opts_template

0th

Percentile

Template for creating reusable chunk options

Creates a template binding a label to a set of chunk options. Every chunk that references the template label will have the specificed set of options applied to it.

Keywords
datasets
Usage
opts_template
format

List of 4 $ get :function (name, default = FALSE) $ set :function (...) $ merge :function (values) $ restore:function (target = value)

Aliases
  • opts_template
Examples
opts_template$set(myfigures = list(fig.height = 4, fig.width = 4))
# later you can reuse these chunk options by 'opts.label', e.g.

# <<foo, opts.label='myfigures'>>=

# the above is equivalent to <<foo, fig.height=4, fig.width=4>>=
Documentation reproduced from package knitr, version 0.9, License: GPL

Community examples

Looks like there are no examples yet.