简体   繁体   中英

Create HTML slides with knitr, Rmarkdown and pandoc

I am trying to create a HTML slides with knitr, Rmarkdown and pandoc. I got a reference from http://rprogramming.net/create-a-slideshow-powerpoint-with-r-knitr-pandoc-and-slidy/ .

But I meet a problem at the step5. After executing

knit("test4.Rmd")
system("pandoc -s -t slidy test4.md -o test4.html")

I got a message

pandoc.exe: Could not parse YAML header: found character that cannot start any token "source" (line 13, column 1)

Please help me to solve this problem. Thanks in advance!

You can check your line 13 in your md file. and change --- into ----- or more. This is how I solved my problem.

Obviously it has something to do with YAML header. I just got inspiration from another stackoverflow answer , so I figure maybe change the --- with ---- (just add more - )can prevent the pandoc from treating it as a YAML block.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM