Problem in creating a Rmarkdown file

I installed what I thought were the correct packages :

  • rmarkdown
  • markdown
  • knitr

However it seems that R doesn't recognize the Rmarkdown language, because when I want to test the default code :


title: "Untitled"
author: "Lea"
date: "12/04/2020"
output: html_document

The error message is the following :


  • title: "Untitled"
    Error in -title : argument incorrect pour un opérateur unitaire

author: "Lea"
Erreur : objet 'author' introuvable
date: "12/04/2020"
Error in date:"12/04/2020" : argument NA / NaN
De plus : Warning message:
NAs introduits lors de la conversion automatique
output: html_document
Erreur : objet 'output' introuvable

Where have I gone wrong please?

What did you do exactly ? What step and what command you ran ?

If you are new to Rmarkdown, this is a great introduction
https://rmarkdown.rstudio.com/lesson-1.html

Thank you for your answer.

Yes I've already seen this page, and I installed the package 'rmarkdown' as they said on it.

Yes it was my first time on Rmarkdown, I just created a new page 'File' -> 'New file' -> 'R Markdown'., and the default code appeared on this new page.

I wanted to run it but when I tried, this error appeared, and I don't understand why.

Is there an ohter package I should install?

Did you click on the blue knit button in RStudio ?
How did you run your saved Rmd file ?

Oh yes that was the problem... I completely confused the 2 buttons 'knit' and 'run' (as I was used to do when I work on R script..). I've been stuck on this for 1 week.. thank you so much!

1 Like

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