output_max_height: Add a scrollbar to R output

Description Usage Details Examples

View source: R/hooks.R

Description

Determine a maximum height that R console output should be and if output is larger than that value, make it scrollable.

Usage

1

Details

To run this hook, call the output_max_height() function and then you can either set a global maximum height

knitr::opts_chunk$set(output_max_height = "300px")

or you can specify it on a chunk by chunk basis

1
2
3
```{r output_max_height = "300px"}
print(mtcars)
```

Examples

1

nathaneastwood/knitrhooks documentation built on May 4, 2019, 3:18 p.m.