Skip to content

Problems saving an Object called by get

5 messages · Luis Felipe Parra, David Winsemius, Ivan Calandra +1 more

#
On Apr 26, 2011, at 7:37 PM, Luis Felipe Parra wrote:

            
You need to save the names rather than the "got"()-ten objects.
#
Hi,

Not sure it is exactly what you're looking for, but it might help you:
save(PortafolioInicial, ...)  ## you just save the original object 
instead of the assign()ed one.
But when you load() it, you have to know its name, so it might be 
difficult to use.

Even better (for me at least), is to use saveObject() from package R.utils:
saveObject(PortafolioInicial, file="whatever.Rbin")
The difference is that when you load the object, you have to assign it 
to an object in the workspace (unlike with save/load) so that its 
original name doesn't matter:
pt <- loadObject("whatever.Rbin")

HTH,
Ivan


Le 4/27/2011 05:59, Luis Felipe Parra a ?crit :

  
    
#
Luis Felipe Parra wrote:
Use

save(list=paste(Algoritmo, "_Portafolio", sep=""),  ... )

Duncan Murdoch