[6318] in s-news-athena
Re: Splus/windows; Using a common .First.root file
daemon@ATHENA.MIT.EDU (John Wallace)
Mon Jan 30 18:25:53 1995
Date: Mon, 30 Jan 1995 14:37:18 -0800 (PST)
From: John Wallace <jrw@fish.washington.edu>
To: s-news@utstat.toronto.edu
In-Reply-To: <9501212146.AA23515@silvae.cfr.washington.edu>
For those just starting to use different icons don't forget that a file
can be called with get() without that directory being attached:
.First <- function()
{
options(prompt = "Project Alpha: S>")
get(".First.root", where = "c:\\usr\\jrw\\_data")()
}
So the second line never changes and all global changes are made to the
.First.root file. The local functions directory and others can then be
attached in the .First.root file:
.First.root <- function()
{
library(trellis, first = T)
attach("c:\\usr\\jrw\\_data") # Here
attach(dummy)
attach(cols22.win, 4) # And here a list is being attached
graphs() # Here a function is run, both from the
options(width = 109) # the now attached local functions
options(length = 80) # directory
invisible()
}
-jrw
On Sat, 21 Jan 1995, Don McKenzie wrote:
> Song Qian writes:
>
> SQ> An easy way to avoid .First() function is to change the "Working
> SQ> Directory" of the icon to where you want. Here is how: copy the original
> SQ> Splus icon, then hightlight the new icon. Go to File-Properties, you will
> SQ> see three fields you can modify with. "Description" should be the name of
> SQ> the icon you want, "Command line" should be left unchanged, and "Working
> SQ> Directory" should be the directory where you want to keep the seperate
> SQ> ".Data" directory. For example, if you want to store you data in c:\work,
> SQ> you should creat .Data under c:\work, and the "Working Directory" is
> SQ> "c:\work".
>
> Good explanation.
> This is exactly what I was suggesting to Daniel, in briefer, and less
> clear form.
>
> The use of .First() is for a different purpose, i.e. to automate anything
> you want to happen initially each time you go to a project. In my case,
> this often involves attaching certain other data directories besides the
> "working directory", thus the .First() function may need to specify a
> slightly different path, for each project, when calling attach().
>
> dmck
>
>
> _______________________________________________________________________
>
> Don McKenzie 206.543.5774
> College of Forest Resources AR-10 dmck@silvae.cfr.washington.edu
> University of Washington
> Seattle, WA 98195
>
> _______________________________________________________________________
>
>
>