【发布时间】:2021-07-29 01:29:22
【问题描述】:
我有这个:
# Title 1
'``{r}
barplot(mtcars$mpg)
'``
text describing plot 1
# Title 2
'``{r}
barplot(mtcars$mpg)
'``
text describing plot 2
# Title 3
'``{r}
barplot(mtcars$mpg)
'``
text describing plot 3
如你所见,重复的单位是:
# Title x
'``{r}
barplot(mtcars$mpg)
'``
text describing plot x
有没有办法创建一个生成这个重复单元的函数?
预期的输入等于我上面的输入:
'``{r}
function_that_creates_title_graph_text(1)
function_that_creates_title_graph_text(2)
function_that_creates_title_graph_text(3)
'``
【问题讨论】:
-
是的,确实如此,tks。
标签: r r-markdown