R/refresh_data.R

Defines functions refresh_data

Documented in refresh_data

#' Refresh UFC data with the latest fights
#' @description
#' This function updates the rda file contained in the package folder data/ufc_stats.rda.
#' @examples
#' refresh_data()
#' # now what we load into memory is the latest dataset
#' data("ufc_stats)
#' @export


refresh_data <- function() {
  ufc_stats<-load(url("https://github.com/mtoto/ufc.stats/blob/master/data/ufc_stats.rda?raw=true"))
  usethis::use_data(ufc_stats, overwrite=TRUE)
}
mtoto/ufc.stats documentation built on March 24, 2024, 1:50 a.m.