Dear R-Mastermind
Within a while or a for-loop, is there a way that I can save to disk the
results of the previous calculations at the end of each loop with filenames
called file01.Rdata, file02.Rdata etc?
So far, I have tried to write the outcome of each loop in a 3 dimensional
array and
Frank Schmid a écrit :
Dear R-Mastermind
Within a while or a for-loop, is there a way that I can save to disk the
results of the previous calculations at the end of each loop with filenames
called file01.Rdata, file02.Rdata etc?
as a toy example :
for (i in 1:nbfiles)
{
fullname =
I think this is what you're looking for:
file_name_root = myfile
for(i in 1:10)
result- of_some_function
out_file-paste(file_name_root, i, .txt, sep = )
write.table(result, file = out_file)
}
the above code produces 10 files (myfile1.txt to myfile10.txt), each
Le 03.10.2005 12:30, Frank Schmid a écrit :
Dear R-Mastermind
Within a while or a for-loop, is there a way that I can save to disk the
results of the previous calculations at the end of each loop with
filenames
called file01.Rdata, file02.Rdata etc?
So far, I have tried to write the