create a loop: convert .txt to .csv in R
问题 I try to convert all my .txt files in .csv, but I didn't manage to create the loop. The actual line for one file (which works perfectly) would be the following: tab = read.delim("name_file", header = TRUE, skip = 11) write.table(tab, file="name_file.csv",sep=",",col.names=TRUE,row.names=FALSE) And I would like to do that for all the .txt file I have in wd. I tried the loop with, based on some reasearch on the web, but I am not sure it's the right one: FILES = list.files(pattern = ".txt") for