prevent r-markdown from unfolding code/function
这是我的 r-markdown 代码:
1 2 3 4 5 6 7 8 9 10 | ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} test_funciton <- function(){<->} 3+5 ``` |
观察
1 2 3 4 5 6 7 8 9 10 11 12 | ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} test_funciton <- function(){ print('test') } 3+5 ``` |
你试过这个答案吗?
我试图在我的 RStudio v1.2.5033 中重现您的问题,它对我有用。
Tools > Global Options > R Markdown > Uncheck: Show output inline for all R Markdown Documents.
That should disable inline code chunk output when you're editing R Markdown documents.
Does that get you what you're asking?