0
我正在嘗試使用R Markdown創建PDF文件。我運行時收到錯誤43。我嘗試使用R Markdown創建word文件和HTML,它工作正常。只有PDF文件不起作用。從R Markdown創建PDF文件時出錯(錯誤43失敗)
processing file: Test_New.Rmd
|...................... | 33%
ordinary text without R code
|........................................... | 67%
label: unnamed-chunk-1 (with options)
List of 1
$ tidy: logi TRUE
|.................................................................| 100%
ordinary text without R code
/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS
Test_New.utf8.md --to latex --from
markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --
output Test_New.pdf --template/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rmarkdown/rmd/latex/default-1.17.0.2.tex --highlight-style tango --latex-engine /usr/local/bin/pdflatex --variable graphics=yes --variable 'geometry:margin=1in'
output file: Test_New.knit.md
dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
Referenced from: /usr/local/bin/pdflatex
Reason: image not found
pandoc: Error producing PDF
Error: pandoc document conversion failed with error 43
Execution halted
我在R Markdown上的代碼如下。
---
title: "Test R Markdown"
author: "Sam Ng"
date: "September 1, 2017"
output:
pdf_document: default
html_document: default
word_document: default
---
# 1. R commands
Testing R commands
```{r,tidy=TRUE}
vector=c(1,2,3) # Create a new vector with three entries
max(vector) # Returns the maximum of a vector
min(vector) # Returns the minimum of a vector
```
嘗試安裝MIKTEX? – jaySf