Skip to content

More powerful than objects() or ls()

2 messages · Patrick Connolly, Brian Ripley

#
According to Thomas Lumley:
|>
|> On Thu, 22 Mar 2001, Patrick Connolly wrote:
|> >
|> > There are times when the date is very valuable information,
|> > particularly years later.  I would like to be able to do something
|> > similar in R but of course, the same method won't work because objects
|> > are not stored as separate unix files in a .Data directory.
|

.....
 
|> comment() does the information management you need. There isn't an
|> automatic way of doing the date information and I can't think ofa general
|> one that wouldn't be horribly slow.  You could add a date-setting function

I think it would be simple enough if I could get something in R to
work the way substitute() does in Splus.  The thinking seems to be
very different between the two dialects.  Maybe if I tinker a bit
longer, I'll get the connexion between them.

|> to your most frequnelty used object creation functions  (perhaps
|> read.table and glm in my case).

That works easily for read.table, and probably for glm, but how would
I make it work for the function function which works internally?  It's
the age of my functions that I'm most interested in -- largely
historical interest.  I've found it immensely useful in Splus.  I'm a
little surprised others aren't so interested.

Thanks Thomas for your help.

best
#
On Mon, 26 Mar 2001, Patrick Connolly wrote:

            
They are almost the same. (See V&R's `S Programming' for a detailed
comparison.)   There is a difference when using function arguments:
S uses the initial values, R the current ones, so in R one often needs to
substitute early or take care to work on copies.
Ah, I think most of us keep our functions in files not in objects, even in
S-PLUS. I even keep my datasets in files (or databases).  I know John
Chambers advocates an `S object is master' view in the Green book, but I
don't find it very practical given current tools.  A CVS archive of R/S
code is a very useful way of version control.

B