Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. ## First put all file names into a list
  2. library(data.table)
  3. files <- list.files(path = "F:\MUMuniv\machine learning class\
  4. price sensitivty\PS works\Customer files",
  5. pattern = ".xls", full.names = T)
  6.  
  7.  
  8. readdata <- function(fn){
  9. dt_temp <- fread(fn)
  10. return(dt_temp)
  11. }
  12.  
  13. # then using
  14.  
  15. all.files <- lapply(files, readdata)
  16. final.data <- rbindlist(all.files)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement