Retrieves the latest UFC datasets. If the data is not cached locally, or if the cached data is stale (older than 7 days), it downloads the latest .RData files from GitHub.

get_ufc_data(
  dataset = c("ufc_athletes", "ufc_fights", "ufcstats_data", "ultimate_ufc_dataset",
    "ufc_rankings_dataset"),
  force_update = FALSE
)

Arguments

dataset

Character. Which dataset to load: "ufc_athletes", "ufc_fights", "ufcstats_data", "ultimate_ufc_dataset" or "ufc_rankings_dataset".

force_update

Logical. If TRUE, forces a fresh download from GitHub.

Value

A data frame of the requested dataset.

Examples

if (FALSE) { # \dontrun{
athletes_df <- get_ufc_data("ufc_athletes")
fights_df <- get_ufc_data("ufc_fights", force_update = TRUE)
} # }