Skip to content

Instantly share code, notes, and snippets.

@AVJdataminer
Created June 27, 2019 21:48
Show Gist options
  • Save AVJdataminer/135c3bbbc7044f2ef14f10b28507cfb9 to your computer and use it in GitHub Desktop.
Save AVJdataminer/135c3bbbc7044f2ef14f10b28507cfb9 to your computer and use it in GitHub Desktop.
Read in multiple files in R
filelist = list.files(pattern = ".*.txt")
datalist = lapply(filelist, function(x)read.table(x, header=T))
#assuming the same header/columns for all files
datafr = do.call("rbind", datalist)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment