opts_template: Template for creating reusable chunk options

opts_templateR Documentation

Template for creating reusable chunk options

Description

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

Usage

opts_template

Format

An object of class list of length 7.

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>>=

yihui/knitr documentation built on Nov. 24, 2024, 5:10 a.m.