Skip to content
Back to formatted view

Raw Message

Message-ID: <200402201758390883.0AFD0B55@harry.molgen.mpg.de>
Date: 2004-02-20T16:58:39Z
From: Wolski
Subject: passing object names in a vector to save?

Hi!

Like to write quite a lot (ca 100) of objects from my envirovment with save.
The names of the objects are in  a list nam.

nam<-dir()
nam<-grep("E",nam,value=T)
length(nam)
20

for(x in nam)
{
	#reads the objects and assigns the names.
	assign(x,simFromEmboss(Simmatrix(),x))
	nnam<-paste(x,".rda",sep="")
	print(nnam)
	save(x,file=nnam)	
}


I knew that it fails. (It saves object x containing a char.) 
How to save the objects in separate files not typing each time save(myobj,save="myobj.rda")???

Is there a workaround.


Sincerely Eryk