2
votes

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!

1
Tried the new new RStudio preview? It's seamless.Ari B. Friedman
w/o the Rmd this is pretty much impossible.Tyler Rinker
I had tried the new RStudio preview and others previews provide in Rstudio. But that still not work.Glen Chen

1 Answers

0
votes

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.