Reading a *.tbl file from several directories and outputting a *.csv file to the same directory

#CODE WORKS FOR ONE FILE
getwd()
#> [1] "C:/Users/Andre Jackson/AppData/Local/Temp/RtmpMvjiYL/reprex71203d3e4ee0"
setwd("C:/biphenpeds_nda205831/physiolpopfit/bootstrap/test1.nm7/")

datr<-read.table(file="param.tbl",header=T)
write.csv (datr, file="fitsubj.csv")

#CODE DOES NOT WORK FOR MULTIPLE TESTi FILES
for (i in seq(from=1, to=5,by=1)) i
("C:/biphenpeds_nda205831/physiolpopfit/bootstrap/testi.nm7/")
#> [1] "C:/biphenpeds_nda205831/physiolpopfit/bootstrap/testi.nm7/"
datr<-read.table(file="param.tbl",header=T)
write.csv (datr, file="fitsubj.csv")

Created on 2019-10-19 by the reprex package (v0.3.0)

A post was merged into an existing topic: Do loop for file entry

Please edit your original post instead of duplicating an open topic.