Let’s use countrypops to create a small gt table. We can change the alignment of the population column with cols_align(). In this example, the label and body cells of population will be aligned to the left.
countrypops |> dplyr::select(-contains("code")) |> dplyr::filter( country_name =="San Marino", year %in%2017:2021 ) |>gt(rowname_col ="year",groupname_col ="country_name" ) |>cols_align(align ="left",columns = population )