R markdown不会转换为pdf

时间:2019-03-28 13:27:19

标签: r r-markdown tex

我正在尝试将我的Rmarkdown文档编织为pdf,但它不断出现以下消息:

Error: Failed to compile R_Markdown.tex. See https://yihui.name/tinytex
/r/#debugging for debugging tips.In addition: Warning message:In     
readLines(logfile) : incomplete final line found on     
'R_Markdown.log'Execution halted

编织到html和word而不是pdf时很好,我安装了MiKTex,并且安装了最新更新,那么问题是什么?我在下面附加了我的代码:

---
title: 'Maths Skills 2: Recent advances in statistics project'
author: "Jamie Tse"
date: "28 March 2019"
output: pdf_document
---

#Part A: UK fishing Vessels 

The goal of this part of the project is to provide a graphical representation of the geographical distribution of
UK fishing vessels under 10 metres in length.

## Creating a map of the UK using ggmap

I begin by loading the `tidyverse` and `ggmap` packages: 

```{r,eval=FALSE}
library(ggmap)
library(tidyverse)

然后我找到了一个合适的包围英国的边界框

bbox <- c(-9.05, 48.77, 2.19, 61)

然后,使用此边界框,我使用UKmap函数创建了地图ggmap()

UKmap <- ggmap(get_map(location = bbox, source = "stamen", maptype = "toner"))

读取货运数据

在创建要在其上绘制数据的地图后,我读入了运输船数据并使用vessels函数将其保存到read.csv()

vessels <-  read.csv("Jan_2019_Under_10m_vessel_list.csv")

0 个答案:

没有答案