0

Having an issue with binding in R. Ive' created the NULL df and created a loop to import multiple files and bind them to the null df. However, my df is still null after this process. Not sure what I am missing. I ran each individual line and also sourced it and still same result.

library(readr)

    df <- NULL

    gamenumbers <- c(20001:20003)

    for(game in gamenumbers){

      filename<-paste0('C:/Users/mike/Google Drive/model_code/TEST2/2017', game, '/', game)

      pbp_df <- read_delim(filename, delim = '|') 

      rbind(df, pbp_df)

    }

enter image description here

Michael T Johnson
  • 605
  • 2
  • 11
  • 26

0 Answers0