[R] More powerful than objects() or ls()

Patrick Connolly P.Connolly at hortresearch.co.nz
Thu Mar 22 03:23:55 CET 2001


platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status                    
major    1                
minor    2.1              
year     2001             
month    01               
day      15               
language R                


For years, I used a function in Splus to give me more information than
just the object names which ls() would do.  Typically, it would give
something like this:

     Object        Mode   Rows Cols Len     Date     
 1 .Last.value  NULL         -    -   0 20 Mar 13:44
 2 last.warning list         -    -  50 16 Mar 13:58
 3 glm.mano     function     -    -   2 16 Mar 13:54
 4 gam.mano     function     -    -   2 16 Mar 13:18
 5 .Random.seed numeric      -    -  12 16 Mar 11:57
 6 Kyph.glm     list         -    -  19 16 Mar 09:42
 7 mano.df      dataframe  240    5   5 15 Mar 11:31
 8 reorg        function     -    -   2 15 Mar 11:31
 9 m793.df      dataframe   15   32  32 15 Mar 10:52
10 .First       function     -    -   1 19 Feb 14:22
11 ps.region    numeric      -    -   4  3 May  1996

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.

I had thought of adding a date with attr() and was then going to redo
the function which could use that information in place of the file
information I used in Splus.  Unfortunately, that means the date
attibute is added to everything when displayed which is too cluttered.

Then of course, I'd need to figure an easy (preferably automatic) way
of adding the date to the objects I was interested in.  However, I was
hoping someone might already have a better way of achieving the same
end, and preferably without the unnecessary verbiage mentioned above.

Ideas gratefully accepted.

Thanks

-- 
*************************************************************
Patrick Connolly
HortResearch                        Great minds discuss ideas;
Mt Albert                           Average minds discuss events; 
Auckland                            Small minds discuss people.
New Zealand                                                 .... Anon
Ph: +64-9 815 4200 x 7188
*************************************************************
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list