Bladeren bron

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

George C. Privon 6 jaren geleden
bovenliggende
commit
7da8829703
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  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