You can use saveRDS() and readRDS() instead of save/load. Unlike load
readRDS just returns the value, allowing you to assign it to whatever name
you want.

Best,
Ista


On Wed, Aug 14, 2013 at 5:52 AM, Witold E Wolski <wewol...@gmail.com> wrote:

> I am have a procedure which generates multidimensional arrays.
>
> To compute them is expensive so I want to store them in order to be
> able to analyse them later.
>
> I am using at the moment
>
> problem is that the array is always assigned to a variable ma (the
> computation is in a loop).
> Than I generate a file name and store it (i.e)
> save(ma, file="ma1.txt")
> save(ma, file="ma2.txt")
> ...
>
>
> problem starts when I want to load it
> load("ma1.RData") # loads in ma
> load("ma2.RData") # overrides ma
>
> How can i prevent this behaviour. Is there a better way to store
> multidimensional arrays?
>
> regards
>
>
> --
> Witold Eryk Wolski
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to