get_rugby: Scrape Bath Rugby match dates, kick-off times and results
Description
Web scraping function to gather dates and times of Bath Rugby matches, and
whether or not Bath won, from the
Bath Rugby website.
Note: This function's code is heavily commented so that if you want
to, you can use it as a tutorial/guide for writing similar functions of
your own! You can view the commented code on the GitHub repo
here.
Usage
get_rugby(x)
Arguments
x
A vector of years of seasons to retrieve records from.
Value
A data frame of kick-off date-times and match outcomes.
# NOT RUN {# Return matches from 2016/17 seasonrugby <- get_rugby(2017)
# }# NOT RUN {# Return matches from 2014/15, 2015/16 seasonsseasons <- c(2015, 2016)
rugby <- get_rugby(seasons)
# }