I have several files in one dirctory: I list them all using:
dir1<- list.files ("/data/", "*.txt", full.names = TRUE)
Gh_12_kj.txt
kh_12_k.txt
Gh_13_kj.txt
kh_13_k.txt
I can read them one by one like this:
for (i in seq_along(dir1)) {file =read.table(i) ……}
I want to combine all files with similar names but different numbers for example:
Rbind Gh_12_kj.txt and Gh_13_kj.txt
Rbind s_13_f.txt and s_12_f.txt and so on for all files in this dirctory
I guess we need unique
but not sur how