# NOT RUN {
# Use `countrypops` to create a gt table;
# With the remaining columns, move the
# `year` column to the start
tab_1 <-
countrypops %>%
dplyr::select(-contains("code")) %>%
dplyr::filter(country_name == "Mongolia") %>%
tail(5) %>%
gt() %>%
cols_move_to_start(
columns = vars(year)
)
# Use `countrypops` to create a gt table;
# With the remaining columns, move `year`
# and `population` to the start
tab_2 <-
countrypops %>%
dplyr::select(-contains("code")) %>%
dplyr::filter(country_name == "Mongolia") %>%
tail(5) %>%
gt() %>%
cols_move_to_start(
columns = vars(year, population)
)
# }
Run the code above in your browser using DataLab