opts_current: how does it work in knitr?

前端 未结 1 1963
北荒
北荒 2021-01-15 04:24

I am trying to set up different figure size in different chunks. I first define a global settings using:

opts_chunk$set(fig.width=7, fig.height=7)

相关标签:
1条回答
  • 2021-01-15 04:41

    For specific code chunks, put the chunk options in the chunk header, e.g.

    ```{r fig.width=7, fig.height=14}
    

    These are called local chunk options, which will override global chunk options (temporarily for this specific chunk).

    0 讨论(0)
提交回复
热议问题