1.Chung

khai báo thư viện

library("flagr")
library("reshape2")
library("utils")
library("readxl")  #đọc excel

#khai báo thư viện của ggplot2
library(ggplot2)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ lubridate 1.9.3     ✔ tibble    3.2.1
## ✔ purrr     1.0.2     ✔ tidyr     1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggthemes)

#chorddiag
#install.packages("chorddiag")
#install.packages("devtools")
#devtools::install_github("mattflor/chorddiag", build_vignettes = TRUE)
#library(chorddiag)

#mặc định
library("reshape2")
library("knitr") # tạo bảng
library("grid")
library("gridExtra") # vẽ nhiều đồ thị cùng lúc
## 
## Attaching package: 'gridExtra'
## 
## The following object is masked from 'package:dplyr':
## 
##     combine
library("kableExtra") # tạo bảng
## 
## Attaching package: 'kableExtra'
## 
## The following object is masked from 'package:dplyr':
## 
##     group_rows
library("naniar") # cho dữ liệu missing
library("mice") # điền các giá trị missing
## 
## Attaching package: 'mice'
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following objects are masked from 'package:base':
## 
##     cbind, rbind
library("rmarkdown")

# bar chart race
library("gganimate")
## No renderer backend detected. gganimate will default to writing frames to separate files
## Consider installing:
## - the `gifski` package for gif output
## - the `av` package for video output
## and restarting the R session
#library("ggflags")
library("countrycode")
library(knitr)

#sửa dữ liệu date
library(lubridate)
library(stringr)
# world map
library("maps")
## 
## Attaching package: 'maps'
## 
## The following object is masked from 'package:purrr':
## 
##     map
library("geosphere")