Reputation: 598
I am facing a problem with knitr
in RStudio
. All of a sudden it stopped running, even knitr
settings are not working showing me this message:
The YAML front matter in this document could not be successfully parsed. This parse error needs to be resolved before format options can be edited.
The code I am running is this simple one:
---
output:
word_document:default
---
```{r}
Weight <- c(60,72, 57, 90, 95, 72)
Height <- c(1.75, 1.80, 1.65, 1.90, 1.74, 1.91)
BMI <- Weight/Height^2
BMI
```
Could you please someone help me ?
Upvotes: 2
Views: 3129
Reputation: 1294
The :default probably ins't needed (It's a default after all), but I believe the reason it won't knit as written is that in the yaml front matter there needs to be a linebreak between word_document:
and default
output:
word_document:
default
---
```{r}
Weight <- c(60,72, 57, 90, 95, 72)
Height <- c(1.75, 1.80, 1.65, 1.90, 1.74, 1.91)
BMI <- Weight/Height^2
BMI
```
Upvotes: 1