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