knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
library(jjshandicap)
library(dplyr)
library(kableExtra)
library(lubridate)
theme_set(theme_minimal())
all_results <- readr::read_rds("data/all_results.Rds")

winter_results = all_results %>% 
  filter(stringr::str_detect(handicap, "2019"))
winter_results %>%
  select(handicap, position, first_name, second_name, gross_time, running_time, handicap_time) %>% 
  arrange(desc(handicap), position) %>%
  mutate(gross_time = lubridate::seconds_to_period(gross_time), 
         running_time = lubridate::seconds_to_period(running_time), 
         handicap_time = lubridate::seconds_to_period(handicap_time)) %>%
  split(.$handicap) %>% 
  map(~ knitr::kable(x = ., format = "html", booktabs = T, col.names = c("Handicap", "Position", "First",
                                           "Seconds", "Race Time", "Running Time", "Handicap Time")) %>% 
  kable_styling(latex_options = "striped"))


jonnylaw/jesmondjoggers documentation built on Jan. 18, 2020, 12:16 a.m.