Rmarkdown
horizontal rule
***
R chunks options
echo=FALSE show output only, no code
include=FALSE no output, show code
messages=FALSE no warnings
eval=FALSE don't run code, no output
KNITR results
results="hide" no results, run code (similar to include=FALSE)
results="hold" hold results to output at end of chunk
results="markup" latex output
results="asis" for kable
kable
table <- matrix(1:6, 2, 3)
knitr::kable(table)
include_graphics
knitr::include_graphics("/Users/minghan/Google Drive/Coursera_survival_analysis/images/ss 2020-05-12 at 16.23.53.png")
HTML text color
some text
spaces
<p>
write text as is with space.
</p>
- or just indent 4 spaces
some more HTML text tags
Tag Description
<b> Defines bold text
<em> Defines emphasized text
<i> Defines italic text
<small> Defines smaller text
<strong> Defines important text
<sub> Defines subscripted text
<sup> Defines superscripted text
<ins> Defines inserted text
<del> Defines deleted text
<mark> Defines marked/highlighted text
RMarkdown front matters
title: "some title"
author: "Hippo"
date: "`r format(Sys.time(), '%Y_%m_%d_%H')`"
output:
html_document:
toc: true
toc_depth: 4
toc_float:
collapsed: false
fig_width: 4
fig_height: 3
fig_caption: true