2017-06-22 20:38:24
Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).
– John Gruber
其实markdown也是一种markup(标记)语言
<h1>Title 1</h1>
<p>Bla <b>bla</b> bla.</p>
<hr>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<img src="image.png"></img>
# Title 1 Bla **bla** bla. * * * - Item 1 - Item 2 
# Header 1 Header 1 ========== ## Header 2 Header 2 ----------- ### Header 3 #### Header 4 ##### Header 5 ###### Header 6
* Item 1
* Item 2
+ Item 2a
+ Item 2b
- Item 2b1
- Item 2b2
1. Item 1
1. Item 2
1. Item 3
1. Item 4
+ Item 4a
+ Item 4b
*italic* _italic_*_
**bold** __bold__
bold
bold
Roses are red, Violets are blue.
Roses are red,
Violets are blue.
Roses are red, Violets are blue.
Roses are red, Violets are blue.
三个或以上星号/短横杠
--- ***
<http://www.google.com> [Google](http://www.google.com)


Fig: logo
A friend once said: > ###### Rule No.1 > - It's always better to give > than to receive. > - Refer to the above.
A friend once said:
Rule No.1
- It's always better to give than to receive.
- Refer to the above.
There were `r nrow(cars)` cars studied
There were 50 cars studied
Let's use dataset `cars`.
Let's use dataset cars.
```{r}
summary(cars$dist)
```
Min. 1st Qu. Median Mean 3rd Qu. Max. 2.00 26.00 36.00 42.98 56.00 120.00
``` summary(cars$speed) ```
First Header | Second Header ------------- | ------------- Content Cell | Content Cell Content Cell | Content Cell Content Cell | Content Cell
| First Header | Second Header |
|---|---|
| Content Cell | Content Cell |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
| First Header | Second Header | |:-------------+--------------:| | Content `Cell` | Content *Cell* | | Content Cell | [Content](google.com) Cell | | Content Cell | Content **Cell** |
| First Header | Second Header |
|---|---|
Content Cell |
Content Cell |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
$\LaTeX$ grammar for $\delta=(\alpha+\beta)/\gamma$
\(\LaTeX\) grammar for \(\delta=(\alpha+\beta)/\gamma\)
Bayes Equation:
$$P(B|A)=\frac{P(A|B)P(B)}{P(A)}$$
Bayes Equation: \[P(B|A)=\frac{P(A|B)P(B)}{P(A)}\]
I spend so much time reading [R bloggers][1] and [Simply Statistics][2]! [1]: http://www.r-bloggers.com/ "R bloggers" [2]: http://simplystatistics.org/ "Simply Statistics"
I spend so much time reading R bloggers and Simply Statistics!
I spend so much time reading R bloggers[^rb] [^rb]: R-bloggers "R-bloggers is a sets of blogs for R users."
I spend so much time reading R bloggers1
Go back to [Page 5](#5).
Go back to Page 5.
<p id="anchor-1">bla bla</p> Go to [anchor1](#anchor-1)
bla bla
Go to anchor1
superscript^2^
superscript2
subscript~2~
subscript2
~~strikethrough~~
strikethrough
rticles包,基于内置模板生成报告

```{r} 或 ```{python} …起始r, engine=python的例子x="Hello, python world!"
print(x.split(' '))
## ['Hello,', 'python', 'world!']
bibliography: example.bib csl: the-lancet.csl
@<文献id>引用某条文献,或
[@<文献1id>;@<文献2id>]引用文献

---
references:
- id: fenner2012a
title: One-click science marketing
author:
- family: Fenner
given: Martin
container-title: Nature Materials
volume: 11
URL: 'http://dx.doi.org/10.1038/nmat3283'
DOI: 10.1038/nmat3283
issue: 4
publisher: Nature Publishing Group
page: 261-263
type: article-journal
issued:
year: 2012
month: 3
---
paramsparams$<对象> 引用这些参数---
title: Sample
output: html_document
params:
data: "iris"
---
```{r}
summary(params$data)
```
.Rmd文档 –[knit]–> .md文档 –[Pandoc]–> 最终文档
Knit按钮
render函数render(input, output_format = NULL,
output_file = NULL, output_dir = NULL,
output_options = NULL,
intermediates_dir = NULL,
knit_root_dir = NULL,
runtime = c("auto", "static", "shiny",
"shiny_prerendered"),
clean = TRUE, params = NULL,
knit_meta = NULL, envir = parent.frame(),
run_pandoc = TRUE, quiet = FALSE,
encoding = getOption("encoding"))
Thank you!
1 Williams TA, Lenders JWM, Mulatero P et al. Outcomes after adrenalectomy for unilateral primary aldosteronism: An international consensus on outcome measures and analysis of remission rates in an international cohort. Lancet Diabetes Endocrinol 2017; published online May. DOI:10.1016/S2213-8587(17)30135-3.
2 Fenner M. One-click science marketing. Nature Materials 2012; 11: 261–3.