Re: [R] *** saving files ***

From: TEMPL Matthias <Matthias.Templ_at_statistik.gv.at>
Date: Thu 15 Sep 2005 - 00:04:23 EST


Hi,

write.table(result, paste("path/file_",i,sep=""))

inside the for-loop should done this in a for( i in ... ) loop.

Or:
save(result, file=paste("path/file_",i,sep="")

See ?read.table and ?load for loading the files.

Best,
Matthias

>
> Hi,
>
>
>
> I need help :o(
>
>
>
> I want that my function saves result files in a for()-loop
> while it runs
> automatically.
>
>
>
> the filenames must be saved like:
>
>
>
> file_1 -> for 1. result
>
> file_2 -> for 2. result
>
> file_3 -> for 3. result
>
>
>
> and
>
> .
>
> .
>
> .
>
>
>
> file_n -> for n. result
>
>
>
> the file names are the same identified by _1, _2 , _3, ... , _n
>
>
>
> these files will loaded by a second function later in the
> same sequence
> (_1 to _n).
>
>
>
> how can I do that ...
>
>
>
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read
> the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Sep 21 02:26:51 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 17:15:57 EST