Re: [R] editing in R

About this list Date view Thread view Subject view Author view

A.J. Rossini (rossini@biostat.washington.edu)
03 Nov 1999 06:49:05 -0800



>>>>> "PDB" == Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:

PDB> Matthew Wiener <mcw@ln.nimh.nih.gov> writes:
>> Hi.
>>
>> I'm having a problem with disappearing comments when I transfer
>> files (entire .RData files) from one machine to another, and
>> I'm not sure whether it's an R problem or an ESS problem.
>> Since ESS seems more likely, I'm trying this list first.

PDB> ...he says and sends to both ess-help and r-help!

PDB> (However, it seems to me this problem only

>> Functions originally shows up fine -- if I type the name of a
>> function at a prompt, the comments are there, and the "source"
>> attribute of the function has the comments as well. But if I
>> use control-c control-d to edit the function, the source shows
>> up without the comments. And of course once I load that
>> version, the comments are gone. The "keep.source" option is
>> set correctly in R.

PDB> This because C-c C-d is using dump() which ignores the stored
PDB> source. This should probably be changed.

Where, Peter? In R, or in ESS? As far as I can tell, this is new
behavior by R which has broken ESS (at least at Matthew is using it).

We do check for the existing file, as the description shows below:

    ;; Three options:
    ;; (1) Pop to an existing buffer containing the file in question
    ;; (2) Find an existing file
    ;; (3) Create a new file by issuing a dump() command to S
    ;; Force option (3) if there is a prefix arg

and if you dump from the current source, of course it overwrites,
since that's what you asked it to do, and since R apparently nukes the
comments, you don't get them again.

Of course, this is why the preferred philosophy for using ESS is to
treat text as the truth, and .Data/.RData contents as realizations
(possibly with small error) of the truth :-). One suggestion is to
force all ESS dumps (C-c C-d) to a directory called something like
.Rsrc (to be concurrent with .RData), and so all local (editable) data
will be relative to the .RData in the same directory.

best,
-tony

-- 
A.J. Rossini			Research Assistant Professor of Biostatistics 
Center for AIDS Research/HMC	Biostatistics/Univ. of Washington
Box 359931			Box 357232
206-731-3647 (3693=fax)		206-543-1044 (3286=fax)
rossini@u.washington.edu	rossini@biostat.washington.edu
http://www.biostat.washington.edu/~rossini/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Tue 04 Jan 2000 - 13:34:00 EST