R/tier_analysis.R

Defines functions tier_analysis

#' @export
tier_analysis <- function(dat = NULL, nclusters = 10) {
  if(is.null(dat)) {
    dat <- get_projections()
    dat <- projected_points(dat)
  }
  vorcluster <- kmeans(dat$VOR, nclusters)
  dat$cluster <- as.character(unlist(vorcluster$cluster))
  return(dat)
}
ctloftin/FantasyFootballData documentation built on Sept. 10, 2022, 9:30 p.m.