R/Reddit.R

Defines functions Reddit_Update

Documented in Reddit_Update

#' Create Fantasy Football Data for Shiny App
#'
#' Updates Data and to post to reddit
#'
#' @export
#'
Reddit_Update <- function(){

  ######Data Export######
  #setwd("C:/Users/morrr/Documents/FantasyFootball")
  usecase <<- "FTA"
  #vartype = "Season"
  #varseason = 2021

  #Load data
  #load(file = "C:/Users/morrr/Documents/FantasyFootball/FantasyFootballApp/data/RecShareData.rdata")
  #load(file = "C:/Users/morrr/Documents/FantasyFootball/FantasyFootballApp/data/Raw_Data.rdata")
  #load(file = "C:/Users/morrr/Documents/AnalyticsFootball/data/pbp_agg.rda")
  #load(file = "C:/Users/morrr/Documents/FantasyFootball/FantasyFootballApp/data/ProjectionData.rdata")

  #Copy graphs
  File_Copy(paste0(getwd(),"/Visualizations/",vartype,"/",usecase,"/",varseason),
            paste0(getwd(),"/Reddit/Graphs/Projection"))
  File_Copy(paste0(getwd(),"/Visualizations/",vartype,"/BalanceAnalysis/",varseason,"/","Receiving Share"),
            paste0(getwd(),"/Reddit/Graphs/Receiving Share"))
  File_Copy(paste0(getwd(),"/Data/",vartype,"/FTA/",varseason,"/","fantasyproj Season FTA.xlsx"),
            paste0(getwd(),"/Reddit/Data/FTA Excel Output.xlsx"))

}
RandalMorris/AnalyticsFootball documentation built on Dec. 18, 2021, 9:52 a.m.