How do you read in multiple .txt files into R? [duplicate]
问题 This question already has an answer here: How to import multiple .csv files at once? 10 answers I\'m using R to visualize some data all of which is in .txt format. There are a few hundred files in a directory and I want to load it all into one table, in one shot. Any help? EDIT: Listing the files is not a problem. But I am having trouble going from list to content. I\'ve tried some of the code from here, but I get a bug with this part: all.the.data <- lapply( all.the.files, txt , header=TRUE)