如何解决R Bookdown中制作书籍的错误

时间:2019-08-18 05:05:24

标签: r yaml bookdown

使用“构建”标签在R bookdown中构建我的书,但遇到错误

我已经将R和R Studio更新到最新版本

---
title: "Lessons for Africa"
subtitle:
- "By"
- "Saanuo"
author: 
- "A thesis submitted to"
- "MASTER’S OF PHILOSOPHY"
- "[FINANCE]"
date: "June, 2020"
output: 
  bookdown::pdf_book:
    includes:
      in_header: preamble.tex
    keep_tex: yes
    latex_engine: xelatex
    citation_package: none
    toc: true
    fig_width: 8
    fig_height: 6
    fig_caption: true
mainfont: Timesnewroman
fontsize: 12pt
linestretch: 1.5
toc-depth: 3
lot: True
lof: True
site: bookdown::bookdown_site
documentclass: book
bibliography: library.bib
csl: harvard-educational-review.csl
link-citations: yes
geometry: "left=4cm, right=2.5cm, top=2.5cm, bottom=2.5cm"

---

\pagenumbering{roman}
# ->Declaration<- {-}

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. 

===

# ->Dedication<- {-}

You can also embed plots, for example:


===
# ->Acknowledgement<- {-}

You can also embed plots, for example:


===
# ->Abstract<- {-}

You can also embed plots, for example:


===
# ->Abbreviations<- {-}

library(tidyverse)
library(knitr)

data_frame(
  Abbreviation = c("WM", "STM", "LTM"),
  Term = c("Working memory", "Short-term memory", "Long-term memory")) %>%
  arrange(Abbreviation) %>%
  kable(booktab = T)
  

我想通过遇到此错误消息来构建我的书。请按要求将此作为我的整个索引文件。谢谢你的关心。非常感激。希望这有助于我弄清楚我的问题。

Error in yaml::yaml.load(..., eval.expr = TRUE) : 
  Scanner error: mapping values are not allowed in this context at line 19, column 14
Calls: <Anonymous> ... enumerate_output_formats -> yaml_load_file -> yaml_load -> <Anonymous>
Execution halted

Exited with status 1.

0 个答案:

没有答案