R markdown

R Markdown Custom Formats - Posit

This is a R markdown or R Notebook Template file:

YAML

Article

---
title: "This is the title for the file"
abstract: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at nunc id quam vehicula rutrum at vitae est. In lacinia turpis nisl, a pulvinar elit feugiat vel. Aliquam facilisis, massa id eleifend tincidunt, lectus ligula malesuada ipsum, sit amet scelerisque diam lorem non enim."
keywords: "keywordA, keywordB"
date: "2033-01-01"
author: "AZATI YAKUFUJIANG"
output:
  pdf_document:
    citation_package: natbib
    toc: yes
    toc_depth: 6
    number_sections: yes
    latex_engine: xelatex
    df_print: kable
    highlight: tango
  html_notebook: default
  html_document:
    toc: yes
    toc_depth: '6'
    df_print: paged
  word_document:
    toc: yes
    toc_depth: '6'
---

Simple

---
title: "This is the title for the file"
date: "2033-01-01"
author: "AZATI YAKUFUJIANG"
output:
  pdf_document:
    citation_package: natbib
    toc: yes
    toc_depth: 6
    number_sections: yes
    latex_engine: xelatex
    df_print: kable
    highlight: tango
  html_notebook: default
  html_document:
    toc: yes
    toc_depth: '6'
    df_print: paged
  word_document:
    toc: yes
    toc_depth: '6'
---

Minimalist

---
title: "This is the title for the file"
output:
  pdf_document:
    toc: yes
    toc_depth: 6
    number_sections: yes
    latex_engine: xelatex
    df_print: kable
    highlight: tango
  html_notebook: default
  html_document:
    toc: yes
    toc_depth: '6'
    df_print: paged
  word_document:
    toc: yes
    toc_depth: '6'
---

Headers

# Header one (Always include this for better doc generation)

## Header 2

### Level 3

Images

Side by Side images

```{r, echo=FALSE}
library(cowplot)
library(ggplot2)

p1 <- ggdraw() + draw_image("assets/1.png", scale = 0.9)
p2 <- ggdraw() + draw_image("assets/2.png", scale = 0.9)

plot_grid(p1, p2)
```

Single image with size

```{r echo=FALSE, out.width = "50%", fig.align = "center"}
knitr::include_graphics("assets/3.png")
```