Created
June 27, 2019 21:48
-
-
Save AVJdataminer/135c3bbbc7044f2ef14f10b28507cfb9 to your computer and use it in GitHub Desktop.
Read in multiple files in R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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