09 February 2018
R: data, analyses, figures.
What about Markdown?
Wikipedia says: “Markdown is a lightweight markup language with plain text formatting syntax.”
Markdown is intended to be as easy-to-read and easy-to-write as is feasible.
html
<a href="https://github.com/KevCaz/aboutRMarkdown">My repo</a>
markdown
[My repo](https://github.com/KevCaz/aboutRMarkdown)
html
<ol> <li> items1 </li> <li> items2 </li> <li> items3 </li> </ol>
markdown
1. items1 2. items2 3. items3
https://blog.codinghorror.com/responsible-open-source-code-parenting/
“I despise what you’ve done with Text::Markdown, which is to more or less make it an alias for MultiMarkdown, almost every part of which I disagree with in terms of syntax additions.” (John Gruber, on 15 Mar 2008)
“A strongly defined, highly compatible specification of Markdow.”
knitr
```{R name, options}
your_code
```
yaml
author: Bill June data: 2018-11-03
pandoc
.Rmd
documentrender()
)knitr
convert code chunk.md
version.md
file + yaml ==> pandoccos(pi)
R>> [1] -1
sin(3)
R>> [1] 0.14112
exp(10)
R>> [1] 22026.47
head(CO2)
R>> Plant Type Treatment conc uptake R>> 1 Qn1 Quebec nonchilled 95 16.0 R>> 2 Qn1 Quebec nonchilled 175 30.4 R>> 3 Qn1 Quebec nonchilled 250 34.8 R>> 4 Qn1 Quebec nonchilled 350 37.2 R>> 5 Qn1 Quebec nonchilled 500 35.3 R>> 6 Qn1 Quebec nonchilled 675 39.2
knitr::kable(head(CO2))
Plant | Type | Treatment | conc | uptake |
---|---|---|---|---|
Qn1 | Quebec | nonchilled | 95 | 16.0 |
Qn1 | Quebec | nonchilled | 175 | 30.4 |
Qn1 | Quebec | nonchilled | 250 | 34.8 |
Qn1 | Quebec | nonchilled | 350 | 37.2 |
Qn1 | Quebec | nonchilled | 500 | 35.3 |
Qn1 | Quebec | nonchilled | 675 | 39.2 |
Rmd
file in RstudioAlternatively, you can use render()