[ESS] setting the location for dump files of R-scripts

Kiermeier, Andreas (PIRSA - SARDI) Kiermeier.Andreas at saugov.sa.gov.au
Thu Feb 24 02:19:51 CET 2005


Hi folks,

I've had some offline correspondence with Sam about the question below. This
email is to summarize the solution and raise a further problem.

Solution:
---------
The key combination C-c C-d calls ess-dump-object-into-edit-buffer. The
location of the associated dump file is determined by setting
ess-source-directory. The help on this function gives an example of how to
set it up in the way that Sam wanted. For example, to save in a subfolder
named "src" use the following.

(setq ess-source-directory 
      '(lambda () (file-name-as-directory
		   (expand-file-name (concat (car ess-search-list)
"/src")))))

Problem:
--------
>From Sam's response this seems to work on his Linux machine. However, it
doesn't work for me on my Windows XP machine with ESS 5.2.5 (GNU Emacs
21.3.50.1 - 386-mingw-nt5.1.2600).

I believe that it has to do with ess-search-list. This variable is initially
nil on start-up of R - if I dump an object at this stage Emacs tries to dump
it into "C:\msys\1.0\src", which does not exist and Emacs tries to create
it. This is the location of MSys (Mingw minimal system), and I have no idea
where / why Emacs is choosing this location.

If I use command completion (TAB) prior to using C-c C-d then
ess-search-list gets set to

(".GlobalEnv" "package:methods" "package:stats" "package:graphics"
"package:grDevices" "package:utils" "package:datasets" "package:lattice"
"Autoloads" "package:base")

A subsequent use of C-c C-d tries to dump to a subfolder "/.GlobalEnv/src/"
of the current directory, e.g. if I start R in "d:\akiermei" then C-c C-d
tries to dump to "D:/akiermei/.GlobalEnv/src/" (difference of forward and
backward slashes are of no consequence here).

Any thoughts?

Cheers,

Andreas

_____________________________
Dr Andreas Kiermeier
Statistician
SARDI FOOD SAFETY PROGRAM

33 Flemington Street
Glenside   SA   5065
Phone:  +61 8 8207 7884
Fax:       +61 8 8207 7854
Mobile: 0423 028 565

Email: Kiermeier.Andreas at saugov.sa.gov.au
_____________________________

The information in this e-mail and attachments (if any) may be confidential
and/or legally privileged. If you are not the intended recipient, any
disclosure, copying, distribution or action taken is prohibited. SARDI, The
South Australian Research and Development Institute, is the research
division of Primary Industries and Resources (SA) 



-----Original Message-----
From: ess-help-bounces at stat.math.ethz.ch
[mailto:ess-help-bounces at stat.math.ethz.ch]On Behalf Of McClatchie, Sam
(PIRSA-SARDI)
Sent: Monday, 21 February 2005 16:57
To: 'ess-help at stat.math.ethz.ch'
Subject: [ESS] setting the location for dump files of R-scripts


Background:
OS: Linux Mandrake 10.1
release: R 2.0 
editor: Emacs 21.3.2
frontend: ESS 5.2.3
---------------------------------
Colleagues

The C-c d is creating text dump files for me, but is putting them in /tmp.
I'd rather have them in the sub-directory where I'm using R. I used to have
a setup where the dump created the text file in ./R-src. Can anyone tell me
how to set this up, please.

Thanks in advance,

Sam 
----
Sam McClatchie,
Sub-program leader, Pelagic Fisheries
South Australian Aquatic Sciences Centre
PO Box 120, Henley Beach 5022
Adelaide, South Australia
email <mcclatchie.sam at saugov.sa.gov.au>
Telephone: (61-8) 8207 5448
FAX: (61-8) 8200 2481
Research home page <http://www.members.iinet.net.au/~s.mcclatchie/>
  
                   /\
      ...>><xX(°> 
                //// \\\\
                   <°)Xx><<
              /////  \\\\\\
                        ><(((°> 
  >><(((°>   ...>><xX(°>O<°)Xx><<

______________________________________________
ESS-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help




More information about the ESS-help mailing list