Sample
x <- 1:10
fileConn<-file("file[x.txt")
writeLines("hello number",
print(x), fileConn)
close(fileConn)
Here what I have is x which goes from 1 thru 10. I wish to make 10 files called "file1.txt" thru "file10.txt" that says
"hello number"
1
thru
"hello number"
10
for example.
edit- it should actually be
hello number 1
instead of
hello number
1