浏览代码

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

George C. Privon 6 年之前
父节点
当前提交
7da8829703
共有 1 个文件被更改,包括 2 次插入2 次删除
  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