Explorar el Código

modify future reading of all seasons to have a simpler ID tag

George C. Privon hace 7 años
padre
commit
7da8829703
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      code/single_season.R

+ 2 - 2
code/single_season.R

@@ -6,10 +6,10 @@ season <- read_csv("data/2017-18_pbp.csv")
 ## for later:
 ## load in all data files and create a single variable
 ## with the filename as an ID column
-#datafiles <- list.files("data", full.names = TRUE)
+#datafiles <- list.files("data", pattern="*_pbp.csv", full.names = FALSE)
 #
 #seasons <- purrr:map_df(datafiles,
-#                        ~read_csv(.x),
+#                        ~read_csv(paste0("data/", .x)),
 #                        .id = "filename")
 
 # construct a new dataframe which is a subset of the original