# NOT RUN {
# Use `exibble` to create a gt table;
# keep only the `date` and `time` columns;
# format the `time` column to have
# times formatted as `hms_p`
# (time style `3`)
tab_1 <-
exibble %>%
dplyr::select(date, time) %>%
gt() %>%
fmt_time(
columns = vars(time),
time_style = 3
)
# Use `exibble` to create a gt table;
# keep only the `date` and `time` columns;
# format the `time` column to have mixed
# time formats (times after 16:00 will
# be different than the others)
tab_2 <-
exibble %>%
dplyr::select(date, time) %>%
gt() %>%
fmt_time(
columns = vars(time),
rows =
time > "16:00",
time_style = 3
) %>%
fmt_time(
columns = vars(time),
rows =
time <= "16:00",
time_style = 4
)
# }
Run the code above in your browser using DataLab