Description Usage Details Examples
Print only lines of the R output that the user specifies. This works
similarly to how echo
works for printing R code.
1 |
To run this hook, call the output_lines()
function and then you can
either print a number of lines for all chunks
knitr::opts_chunk$set(output_lines = 1:10)
or you can specify it on a chunk by chunk basis
1 2 3 | ```{r output_lines = 3:15}
print(mtcars)
```
|
Several options are available
prints lines 1:n ...
prints lines 1:n ...
prints lines ... 3:15 ...
removes lines 1:8 and prints ... 9:n ...
Note, there is no allowance for anything but a consecutive range of lines
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.