set_alias: Set aliases for chunk options

Description Usage Arguments Value Examples

View source: R/defaults.R

Description

We do not have to use the chunk option names given in knitr; we can set aliases for them. The aliases are a named character vector; the names are aliases and the elements in this vector are the real option names.

Usage

1

Arguments

...

Named arguments. Argument names are aliases, and argument values are real option names.

Value

NULL. opts_knit$get('aliases') is modified as the side effect.

Examples

1
2
3
set_alias(w = "fig.width", h = "fig.height")
# then we can use options w and h in chunk headers instead of fig.width and
# fig.height

yihui/knitr documentation built on Dec. 14, 2018, 6:22 p.m.