From owner-r-help@stat.math.ethz.ch Mon Oct 18 05:37:26 1999 Received: from stat.math.ethz.ch (majordom@hypatia.ethz.ch [129.132.58.23]) by t2.mscf.uky.edu (8.8.5/8.8.5) with ESMTP id FAA01894 for ; Mon, 18 Oct 1999 05:37:23 -0400 (EDT) Received: by stat.math.ethz.ch (8.9.1/8.9.1) id LAA02887 for r-help-gang-use; Mon, 18 Oct 1999 11:00:20 +0200 (MET DST) Received: (from daemon@localhost) by stat.math.ethz.ch (8.9.1/8.9.1) id LAA02881 for ; Mon, 18 Oct 1999 11:00:18 +0200 (MET DST) Received: from mailhost.zen.co.uk(212.23.8.4) via SMTP by hypatia, id smtpdAAAa000gz; Mon Oct 18 11:00:13 1999 Received: from quantex.co.uk (IDENT:root@60.godel.zen.co.uk [212.23.16.188]) by mailhost.zen.co.uk (8.9.1/8.9.1) with ESMTP id JAA27518 for ; Mon, 18 Oct 1999 09:00:16 GMT Received: from localhost (j.logsdon@localhost) by quantex.co.uk (8.8.7/8.8.7) with ESMTP id JAA10568 for ; Mon, 18 Oct 1999 09:57:42 +0100 X-Authentication-Warning: mercury.quantex: j.logsdon owned process doing -bs Date: Mon, 18 Oct 1999 09:57:41 +0100 (GMT) From: John Logsdon X-Sender: j.logsdon@mercury.quantex To: r-help@stat.math.ethz.ch Subject: [R] Date/time of formation of objects Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-r-help@stat.math.ethz.ch Precedence: bulk Status: OR Hi Is there any way of attaching the date and time of formation of an object so that ls() can report such things in a manner similar to the Unix ls command? And/or a comment attached? Could this be added to the housekeeping wish-list? I usually use my own little command lls() (below) that reminds me of the mode and size of a structure since I often have R sesssions open for days at a time. Addition of the date and time and a comment describing the function or whatever would be a great aid to my poor memory and an alternative to losing the piece of paper I have written the description down on. Sorting by date/time would automatically group all objects created at the same time together. Presumably since S+ stores everything in .Data this can automatically be arranged by system('ls -lrt .Data') for example, just about the only advantage of overworking your disk other than error recovery that I can think of. Assuming Unix of course. Just a thought - along with the autosave when quiescent that I posted a little while ago ... John lls<-function (pat = "") { lll <- ls(1, pat = pat) for (i in 1:length(lll)) { cat(formatC(eval(parse(t = paste("mode(", lll[i], ")"))), 1, 12), formatC(lll[i], 1, max(nchar(lll)) + 1), eval(parse(t = paste("dimx(", lll[i], ")"))), "\n") } } where dimx<-function (dd) { if (is.null(dim(dd))) { length(dd) } else { dim(dd) } } -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._