[ESS] Dumping functions with C-c C-d in R 2.0.0 has new "feat ure"/ RCS
Patrick Connolly
p.connolly at hortresearch.co.nz
Wed Oct 27 22:25:23 CEST 2004
On Tue, 26-Oct-2004 at 11:46PM -0400, Richard M. Heiberger wrote:
|> What are you doing when you save a date to a file?
It's somewhat involved, and evidently not very interesting to other R
users, but since you ask....
|> Are you doing something to the R object that is saved inside the
|> file .RData? Are you talking about the myfile.r file that stores
|> object definitions?
Just before objects are saved to .RData, I have a little procedure
that adds the current date as a comment to any object that has none
already, then it saves the body of the functions that have been
updated or created to a text file. I used the comment instead of a
general named attribute because it was an attribute that wasn't
displayed under "normal" use.
I could bore the list with ravings about how I use the date
information everyday, but I'll desist. I've mentioned it before but
few were interested.
|> When is the behavior you don't like? What is the appearance on the screen?
|> Are you talking about displaying a function in the *R* buffer?
|> Are your talking about what you see when you dump a function with C-c C-d
|> to /tmp/p.connolly.object.R? What was the previous behavior?
|>
|> Please send some selections from the *R* buffer that illustrate both
|> the behaviors you do like and the behaviors you don't like.
Here's a little function I made some years ago. From the *R* buffer,
it looks like this:
> sub.col.names
function(x, patt = "D")
{
### Gets the names of x that fit a particular pattern patt
col.names <- names(x)
y <- col.names[grep(patt, col.names)]
}
>
In the /tmp/p.connolly.sub.col.names.R buffer, it looks like this:
"sub.col.names" <-
structure(function(x, patt = "D")
{
### Gets the names of x that fit a particular pattern patt
col.names <- names(x)
y <- col.names[grep(patt, col.names)]
}
, comment = "13/06/2000")
Until the new behaviour of dump(), the whole structure stuff didn't
happen. Now, everything I want to edit is shunted 12 extra spaces to
the right. In the small example, it's of no consequence, but when
there are panel functions in calls to lattice functions, I can really
do with that extra 12 spaces.
It also means that I have to hand edit the comment -- something I had
happening automatically up to now.
Martin has given some information that will probably do what I need.
Thanx
--
Patrick Connolly
HortResearch
Mt Albert
Auckland
New Zealand
Ph: +64-9 815 4200 x 7188
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
I have the world`s largest collection of seashells. I keep it on all
the beaches of the world ... Perhaps you`ve seen it. ---Steven Wright
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
More information about the ESS-help
mailing list