Learn R Programming

TBox (version 0.2.2)

generate_chunk_header: Generate R chunk header

Description

Function to generate R chunk header for rmarkdown rendering in different output

Usage

generate_chunk_header(...)

Value

a string of length 1

Arguments

...

The different options for R code chunks.

Details

To get the list of all accepted options, you can call names(knitr::opts_chunk$get()) and to get the default values you can call knitr::opts_chunk$get().

More information in the function #' opts_chunk or directly https://yihui.org/knitr/options/#chunk-options to see all available options and their descriptions.

Examples

Run this code

generate_chunk_header()
generate_chunk_header(eval = TRUE, echo = TRUE)
generate_chunk_header(results = "asis")
generate_chunk_header(fig.width = "4px", fig.height = "3px")

Run the code above in your browser using DataLab