I watched a great webinar by RStudio the other day about RMarkdown. After the webinar they posted the code used in the demonstrations online and I wanted to check out one example. I took their code, put it in my RStudio (which says it's fully up-to-date, v0.98.978), installed or updated all the necessary packages and hit "Run Document"
I receive an error which I do not understand and for which Google has been very unhelpful. What is this mysterious <document start> and how do I include it? I assumed all necessary components would be included given the source of the code.
Error in yaml::yaml.load(front_matter) : Parser error: did not find expected <document start> at line 2, column 1 Calls: <Anonymous> -> parse_yaml_front_matter -> <Anonymous> -> .Call Execution halted
The issue came from copying the code from the browser to Rstudio.
The original header information was:
--- title: "Linked brushing" output: html_document runtime: shiny ---
the pasted text was:
--- title: "Linked brushing" output: html_document runtime: shiny ---
The missing <document start> was an unequal amount of white space before each element of the header. This can be fixed by adding white space to the 'output' and 'runtime' lines or by removing the white space of the 'title' line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With