2016-08-18 3 views
3

마크 다운 문서를 작성하고 있지만 내 문서를 저장하는 것이 더 쉽도록 폴더를 정리하고 싶습니다.RMarkdown을 사용한 하위 디렉토리 작업

문서에 넣을 이미지가 일부 있지만 .RMD 문서에 상대적인 Images이라는 하위 폴더에 저장되어 있습니다. 나는이 오류가 없도록 내가 이것을 설정하는 방법

:

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

이 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) 
여기

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 

내 코드입니다

+1

OK! 나는 이것을 시도했지만 작동하지 않았다. 그냥 폴더 이름에서 슬래시를 추가했기 때문입니다. Do! Do not do this :'! [Markdow 새로 만들기] (/ Images/fig1.png) –

+1

작업 디렉토리가 이미 설정되어 있으므로 슬래시는 필요하지 않습니다. – keberwein