0

我正在使用rmarkdownknitr

我有两个问题:

Q1:我不确定为什么我构建rmarkdown文档时没有出现图形标题。

这是一个例子。我在那里得到了这个数字,但没有数字标题!

---
title: "Untitled"
author: "XXXX"
date: "9 September 2016"
output: pdf_document
---

## R Markdown

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

![figure1 caption](my photo.png)

Q2:我正在使用 RStudio 开发一个 R 包。我可以html_vignette使用下面的代码创建一个。但是,我不确定为什么当我将输出更改为时无法创建 PDF 小插图output: rmarkdown::pdf_vignette?后者给出一个错误:

Error: 'pdf_vignette' is not an exported object from 'namespace:rmarkdown' Execution halted

---
title: "TITLE XXX"
author: "AMT"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{package-intro}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

我是这个领域的新手,所以如果有人能解释一下,那就太好了。

4

0 回答 0