[ESS] New ESS user questions.
Rodney Sparapani
rsparapa at mcw.edu
Mon Aug 9 22:45:58 CEST 2010
On 08/ 9/10 02:04 PM, Alex Bokov wrote:
> I've just started using ESS and so far it's wonderful. The only problem
> is session management. When I run R from a console, for each project I'm
> working on I have a script for invoking one or more R sessions in
> specific directories along with a text editor preset to open certain files.
>
> The part I can't figure out is how to specify what the R working
> directory should be. I tried to set the default directory and launch R
> in my .emacs file as follows...
>
> (setq ess-directory '"~/Documents/10_mydir")
> (R)
>
> ...iESS launches an R session just fine but no matter what I set the
> directory to, R's working directory is always "~/Documents/". What am I
> doing wrong?
>
> I suppose I could set the desired directory as an environment variable
> or write it to a temporary file and then have my .Rprofile read it and
> change directories accordingly, but that seems like reinventing the
> wheel if Emacs can do it for me.
>
> Thanks.
Hi Alex:
There is a new feature in ESS 5.11 that might be of interest to you
http://ess.r-project.org/Manual/ess.html#New-features
Check out M-RET
Documentation:
Synchronise the current directory of the S or R process to the one of
the current
buffer. If that buffer has no associated *R* process, provide a message.
Rodney
More information about the ESS-help
mailing list