Skip to content
Back to formatted view

Raw Message

Message-ID: <A4E5A0B016B8CB41A485FC629B633CED46953D1F87@GOLD.corp.lgc-group.com>
Date: 2012-08-17T16:31:03Z
From: S Ellison
Subject: set working directory to current source directory
In-Reply-To: <20120814145951.46c59a32@cb-t61p>

> Subject: Re: [R] set working directory to current source directory
A windows-centric work-round (assuming .Rdata files are 'associated' with the right R binary n installation) is to save an empty environment  in the relevant project directory with the source file you would normally run. Starting R by clicking on .Rdata file opens R in the right directory to start with. Using relative paths in scripts thereafter then keeps things within the project work area. Starting the first script with rm(list=ls()) guards against inadvertent inclusion of old data (and even apparently 'empty' environments aren't necessarily empty, so I clean up regardless if I start a session that way).

S Ellison

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}