[R] namespaces

Gabor Grothendieck ggrothendieck at gmail.com
Thu Oct 2 18:37:19 CEST 2008

The trick about setting the windows title is quite nifty and I've just
added that to my profile.

Just wanted to add two additional ways to start up R in the current directory
on Windows.  They are provided in the batchfiles distribution.  See home
page at:

1. If you tend to work from the Windows console then starting R via the
Rgui.bat command will do it and

2. if you tend to use Windows explorer right clicking a folder, choosing SendTo
and then choosing RguiStart.bat will also do it.

Installing Rgui.bat consists only of copying that file to any folder
on your PATH
and installing RguiStart.bat consists of the single line:

copy RguiStart.bat %APPDATA%\Microsoft\Windows\SendTo

Both Rgui.bat and RguiStart.bat automatically find the current
version of R in the registry which is why there is no additional
setup needed.  More info is in the README.

On Thu, Oct 2, 2008 at 12:11 PM, Greg Snow <Greg.Snow at imail.org> wrote:
> Here is what I do:
> I have a different folder/directory for each of my different projects, then I start a new R session for each project that I am working on.  If you start R with the folder/directory as the current working directory then the workspace for that project is loaded (and the script files in that directory show up when I want to load them).  This means that I often have multiple copies of R running at the same time (which works fine), and switching between the projects just means switching which R window I am in.  The workspace saving between sessions pretty much takes care of itself (but still keep the script files to recreate data if needed).
> If you are using windows, then the website:
> http://research.stowers-institute.org/efg/R/TechNote/WindowsExplorerWorkingDirectory/index.htm
> shows a way to set up windows so that you can run R from a given folder using a right click.
>  I also have the line:
> utils::setWindowTitle(getwd())
> in my .Rprofile so that the working folder name shows up in the window title.
> Not exactly what you asked for, but it works well for me.  Hope it helps,
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.snow at imail.org
> 801.408.8111
>> -----Original Message-----
>> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
>> project.org] On Behalf Of Alexy Khrabrov
>> Sent: Thursday, October 02, 2008 9:03 AM
>> To: r-help at stat.math.ethz.ch
>> Subject: [R] namespaces
>> I'd like to control my namespace thoroughly, separated by task.  Is
>> there a way, in R session, to introduce namespaces for tasks
>> dynamically and switch them as needed?  Or, is there a combination of
>> load/save workspace steps which can facilitate this?
>> Cheers,
>> Alexy
>> ______________________________________________
>> R-help at 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.
> ______________________________________________
> R-help at 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.

More information about the R-help mailing list