Rconsole wishlist
Duncan Mackay wrote:
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.
Yes. But you can define an environment variable R_HISTSIZE (or some similar name, do a R site search to find. Not defined on my machine now. That should really be in the help file for savehistory()) to avoid the problem.
(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
NO. it is better to have just one file as now. Kjetil
.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 at 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 at 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 at 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
--
Kjetil Halvorsen.
Peace is the most effective weapon of mass construction.
-- Mahdi Elmandjra
No virus found in this outgoing message. Checked by AVG Anti-Virus.