相关疑难解决方法(0)

使用knitr将降价文档的部分插入另一个降价文档中

我知道这可以用php和其他语言来完成,但是想知道是否可以使用knitr完成以下操作:

假设我有一个带有两个标题1部分的Rmarkdown(.rmd)文档:

# This is the first heading for the first document
Lorem ipsum dolor sit amet

# This is the second heading for the first document
plot(object)
Run Code Online (Sandbox Code Playgroud)
  1. 问题1:如果打开另一个.rmd文档,我该如何创建一个链接,以便在解析时,该文档将显示其内容以及第一个文档中的整个内容.例如:

    # This is the first heading for the second document
    Lorem ipsum dolor sit amet
    
    [command goes here to insert the first document]
    
    Run Code Online (Sandbox Code Playgroud)

    结果将是:

    # This is the first heading for the second document
    Lorem ipsum dolor sit amet
    
    # This is the first heading for the first document
    Lorem ipsum …
    Run Code Online (Sandbox Code Playgroud)

markdown r knitr r-markdown

17
推荐指数
1
解决办法
4079
查看次数

标签 统计

knitr ×1

markdown ×1

r ×1

r-markdown ×1