Knitr中的标头 [英] Headers in Knitr
本文介绍了Knitr中的标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在R控制台中使用针织器(不是 RStudio)来处理标题.有许多使用YAML标头的示例,例如:
Is there a way to use knitr from within the R console (not RStudio) to process a header. There are many examples using YAML headers such as:
---
title: "Habits"
author: John Doe
date: March 22, 2005
output: html_document
---
但是,有没有一种方法可以在R控制台中使用knit2html
来包含此标头呢?谢谢!
However, is there a way to have this header included using knit2html
from within the R console? Thanks!
推荐答案
否,YAML元数据特定于R Markdown v2,即 R Markdown v1 .
No, the YAML metadata is specific to R Markdown v2, i.e. the rmarkdown package. The knitr::knit2html()
function is for R Markdown v1 only.
这篇关于Knitr中的标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文