Headers in Knitr

戏子无情 提交于 2019-12-31 01:56:28

问题


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
---

However, is there a way to have this header included using knit2html from within the R console? Thanks!


回答1:


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.



来源:https://stackoverflow.com/questions/29518223/headers-in-knitr

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!