[R] save an object by dynamicly created name

Dieter Menne dieter.menne at menne-biomed.de
Mon Nov 2 18:20:20 CET 2009




jeffc wrote:
> 
> Hi,
> 
> I would like to save a few dynamically created objects to disk. The
> following is the basic flow of the code segment
> 
> for(i = 1:10) {
>    m = i:5
>    save(m, file = ...) ## ???
> }
> To distinguish different objects to be saved, I would like to save m as
> m1, m2, m3 ..., to file /home/data/m1, /home/data/m2, home/data/m3, ...
> 
> 

save(m, file = paste("/home/data/m", i, ".rdata", sep="")

Dieter

-- 
View this message in context: http://old.nabble.com/save-an-object-by-dynamicly-created-name-tp26155437p26157748.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list