RE: [R] Rconsole wishlist

From: Duncan Mackay <Duncan.Mackay_at_flinders.edu.au>
Date: Fri 04 Mar 2005 - 15:00:20 EST


Sorry, yes, Rgui under WinXP (SP2). But while Windows date stamps the history file

> file.info(".Rhistory")

          size isdir mode mtime ctime .Rhistory 5377 FALSE 666 2005-03-04 10:37:52 2005-03-04 10:37:52

                        atime

.Rhistory 2005-03-04 13:54:11

the problem is that there can be multiple sessions stored in .Rhistory and the session dates aren't stored there. Moreover, it seems to me that the history buffer can also overflow without warning after long sessions or many repeated sessions and so that you can inadvertently lose parts of your command log. (Is this right, anyone?) Perhaps it would be preferable for R to save each session's command history in a separate history file, along the lines of

.Last <- function() {

savefilename <- paste("Rhistory",date())
savefilename <- gsub(" ","_",savefilename)
savefilename <- gsub(":",".",savefilename)
savefilename <- paste(savefilename,".txt",sep="")
if(interactive()) try(savehistory(savefilename)) cat("Current history saved in file: ",savefilename,"\n") }

but this doesn't address any overflow issues.

Duncan

-----Original Message-----
From: Liaw, Andy [mailto:andy_liaw@merck.com] Sent: Friday, 4 March 2005 11:14 AM
To: 'Duncan Mackay'; R-news
Subject: RE: [R] Rconsole wishlist

I'm guessing you're talking about Rgui on Windows, but please don't leave us guessing.

If you run R under Ess/(X)Emacs, you have the entire session that can be saved in a (transcript) file.

Does your OS not put date stamps on file?

> file.info(".Rhistory")

          size isdir mode mtime ctime .Rhistory 1025 FALSE 666 2005-03-03 19:27:31 2004-08-13 10:45:09

                        atime

.Rhistory 2005-03-03 19:27:31

Andy

> From: Duncan Mackay
>
> Hi all,
> Wouldn't it be nice (??!!) if R automatically issued a
> warning message when
> the R console buffer was about to fill so that you could save all your
> output into a text file? (I know about sink(), but I think it
> would be good
> to have an easier mechanism to save a complete record of messages and
> function output). And on a similar vein, wouldn't it also be nice if R
> automatically entered a date stamp into the history file??
>
> Duncan
>
>
> *****************************************
> Dr. Duncan Mackay
> School of Biological Sciences
> Flinders University
> GPO Box 2100
> Adelaide
> S.A. 5001
> AUSTRALIA
>
> Ph (08) 8201 2627 FAX (08) 8201 3015
>
http://www.scieng.flinders.edu.au/biology/people/mackay_d/index.html   

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
--
Notice:  This e-mail message, together with any attachments,...{{dropped}}

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Mar 04 15:15:17 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:40 EST