Re: [R] attach and detach question

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sat 08 Jul 2006 - 04:11:35 EST

There is an example of saving just two objects in the example section of ?save

To check whether an object of a given name exists see ?exists

On 7/7/06, markleeds@verizon.net <markleeds@verizon.net> wrote:
>
> I have a large R program that I am constantly running over and over again. At the beginning of this program, I create a hige matrix and a huge dataframe but these are constant. What I mean by constant is that, if I run the program over later, I really should just use the old matrix and dataframe ( if they exist ) that were created in a previous run so that the program doesn't have to spend time creating them. Unfortunately, I don't know how to do this so things take foreeer because every time i do a new run, i recreate these objects and the boss is getting a little annoyed. I know/think that I should use attach and detach commands but
>

> 1) i can't find an example somewhere of
> just saving two objects rather than the whole session.
> i've looked and looked and i can't find it.

>
> 2) if i am able to save these two objects, i was hoping that it
> would be possible to write code inside my R program
> that basically says, "if these objects already exist in
> such and such database, then skip over this section of the code
> that creates them".

>
> if someone has some code or a page number or reference, this is fine because i used to do pretty much this in Splus so think i can figure it out if i can just find an example. thanks a lot.
>
> ______________________________________________
> 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 Sat Jul 08 04:16:47 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 08 Jul 2006 - 06:15:57 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.