소스 검색

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