Knitting error with RMarkdown


I am trying to knit an RMarkdown to a word document and I keep receiving this error message:

Error in yaml::yaml.load(..., eval.expr = TRUE) :
Parser error: while parsing a block mapping at line 1, column 1 did not find expected key at line 1, column 10
Calls: ... parse_yaml_front_matter -> yaml_load ->
Execution halted

Does anyone have any idea on what the problem is? Thank you in advance.


The error appears to be related to your YAML header. Make sure that the indentation of each element is correct and that you're using the correct key:value pairs.

For example:

title: "Habits"
    toc: true
    toc_depth: 2

I reviewed my YAML header, fixed it and knitting worked! Thank you so much.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.