[Solved] Converting R code to Markdown or RNotebok


Within R studio, you can choose R markdown .
Navigate to File Option -> New File -> R Markdown

There are no changes in coding. All codes that you write in R would be as-is. Just with a flexibility that you can add comments and explain your code.
Make sure in .Rmd file, there are {} clauses. don’t make any changes to it while writing code.

You will observe below chunk in .Rmd file. Make sure you should not delete {} but you may write any heading within these brackets.Followed by these brackets, you can write your code.

```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = TRUE)
```

0

solved Converting R code to Markdown or RNotebok