Working with subdirectories with RMarkdown

你说的曾经没有我的故事 提交于 2019-12-23 16:13:21

问题


I'm writing a markdown document but I want to organize my folders so that it's easier to store all my things for my document.

I have some images that I want to put in the document but they are stored in a subfolder called Images relative to the .RMD document.

How can I set this so that I don't have this error:

pandoc: Could not fetch New%20file.png
New file.png: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 67
Execution halted

Here is my code:

---
title: "Markdown Tutorial"
author: "Me"
date: "August 18, 2016"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, fig.path='Images/')
```

# Creating and Setting Your Document

To create your first markdown document, open up RStudio and clic on File > New File > R Markdown... 

![Creating a new Markdow](New file.png)

回答1:


Put the full path in your Rmarkdown:

# Creating and Setting Your Document

To create your first markdown document, open up RStudio and clic on File > New File > R Markdown... 

![Creating a new Markdow](Images/fig1.png)


来源:https://stackoverflow.com/questions/39022613/working-with-subdirectories-with-rmarkdown

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