# NOT RUN {
# first, set current working directory
# e.g. to script's path with setwd(path_neat())
# read all text files in currect working directory
merged_df = read_dir("\\.txt$")
# merged_df now has all data
# some advisable options passed to read.table
merged_df = read_dir(
'\\.txt$',
header = TRUE,
fill = TRUE,
quote = "\"",
stringsAsFactors = FALSE
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab