Using RStudio's "Compile Notebook to html" feature, I noticed that a temporary .md file was created in the process, but deleted automatically. At one point I was lucky enough to see its content, and it is exactly what I need: the code chunks alternate with output chunks, all perfectly formatted.
So my question is: how do I generate such an .md file directly form an R script?
You could also run knitr::spin()
directly from the R console.
You could open an R Markdown file in RStudio and paste all of your code into it. Just make sure your code is inside an R
chunk:
```{r}
Your code
```
Then click "knit HTML" and a .md
file will be created and saved in your working directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With