Split r chunk header across lines in knitr
问题 When I'm inserting long captions and the like in my R chunk header, it'd be nice to be able to split the header across multiple lines. Is there any easy way to do this? E.g.: ```{r, echo=FALSE, warning=FALSE, fig.cap="Here is my really long caption. It'd be nice to split this and other portions across lines"} print(plot(x=runif(100),y=runif(100))) ``` 回答1: No, you cannot insert line breaks in chunk options. From the manual: Chunk options must be written in one line; no line breaks are allowed