hook_figure_unit {chunkhooks}R Documentation

Change the unit of figure size

Description

By default, figure size of R Markdown is specified with inches. This function changes the default unit.

Usage

hook_figure_unit(unit = "mm", .set = TRUE)

Arguments

unit

A string of an unit (default: "mm"). Available units follow. measurements::conv_unit_options$length

.set

TRUE or FALSE to set the hook.

Details

As a side effect, fig.retina is set to NULL because of https://github.com/yihui/knitr/issues/1876.

Value

invisible hook function

Examples

hook_figure_unit('mm')


[Package chunkhooks version 0.0.1 Index]