1

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

2
  • What do the beginning line of your for look like? There should be some lines in between rows of "---" (dashes) which is the yaml front matter Commented Apr 2, 2017 at 12:33
  • imgur.com/a/EJHnj here is a link to the snapshot of the beginning of the page with line 7. What is wrong with it? There is some wrong line? Commented Apr 2, 2017 at 15:40

1 Answer 1

1

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. ```

Sign up to request clarification or add additional context in comments.

3 Comments

I made corrections but now I am getting another error message. Can you please check why it fails to work correctly. It seems to have some issues as it tries to save the work: I attach snapshots in this link with the error message imgur.com/a/8r0oP
log.txt was not found. Note that Rmarkdown only takes into account objects which had been created in the document. This means that even if you see them in your environment, they will not be knited in the finale HTML file. when they were not defined in your code.
But, what is wrong with this? leg.txt is part of the code to make a legend in the graph. I do not understand why it would not be recognised as it is created in R

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.