Ania
Ania

Reputation: 21

Error trying to save PDF or HTML using Knit button in R Markdown

I am getting an error when I try to save a file in R Markdown using Knit

'Error in yaml::yaml.load(string, ...) : Scanner error: while scanning for the next token at line 7, column 1found character that cannot start any token at line 7, column 1 Calls: ... parse_yaml_front_matter -> yaml_load_utf8 -> -> .Call Execution halted'

Can you please how to fix this? I cant save anything at the moment

Upvotes: 1

Views: 1531

Answers (1)

J_F
J_F

Reputation: 10352

The YAML header had to look like this:

---
title: "Microarray analysis 2"
author: "Ania"
date: "3/9/2017"
output: html_document
---

You can implement your R code after this header. Note that your R code has to be implemented in this way:

```{r}
source("http://bioconductor.org/biocLite.R")
```

The way you tried will not work, because (1) the source command was not in an R-environment, (2) the URL http://bioconductor.org/biocLite.R [1] was not found. ```

Upvotes: 1

Related Questions