Format R Markdown và Quarto

R Markdown

Tham khảo cú pháp:

https://epirhandbook.com/vn/new_pages/rmarkdown.vn.html

https://bookdown.org/yihui/rmarkdown

https://bookdown.org/yihui/rmarkdown-cookbook

---
title: 
author: 
date: "`r Sys.Date()`"
output:
  html_document:
    toc: true
    toc_depth: 5
    number_sections: true
    toc_float:
      collapsed: false
      smooth_scroll: false
editor_options: 
  chunk_output_type: console
---

```{r, echo=FALSE, results='hide'}
knitr::opts_chunk$set(message = FALSE,     
                      warning = FALSE) 
```

Quarto

Quarto là phiên bản cải tiến của R Markdown, ta cần cài đặt từ link bên dưới.

https://quarto.org

---
title: 
author:
date: last-modified
format:
  html:
    toc: true
    toc-title: "Mục lục"
    toc-expand: 8
    toc-depth: 6
    toc-location: left
    number-sections: true
    number-depth: 8
    page-layout: full
    embed-resources: true
    anchor-sections: true
    smooth-scroll: true
engine: knitr
knitr:
  opts_chunk:
    R.options:
      width: 120
editor_options: 
  chunk_output_type: console
---

```{r, echo=FALSE, results='hide'}
knitr::opts_chunk$set(message = FALSE,  
                      warning = FALSE)   
```