search for: savehistory

Displaying 20 results from an estimated 71 matches for "savehistory".

2002 Sep 19
3
savehistory directories and quitting R (PR#2038)
# # r-bugs@r-project.org # ###################################################### Because I work in different directories, but always want to save my .Rhistory in the same place, I have changed the system function savehistory to this: function (file = "D:/R50/.Rhistory") invisible(.Internal(savehistory(file))) When I use q() to quit R, and it asks me whether I want to "save current workspace", a response of YES means that the .Rhistory is saved in the current working directory, rather than D:/R50/...
2003 May 14
1
savehistory not working properly in R?
Dear R users, I have a .RData which contains .Last object as follows: .Last <- function () { savehistory(file = ".Rhistory") } In this directory, if I issue the following command Rterm --save < mycmds.q to execute commands in mycmds.q and to save results in .RData, I got the following error message towards the end of the execution: Error in savehistory(file) : savehistory can only...
2002 Oct 21
1
savehistory directories and quitting R (PR#2038)
...my problem, as below. BTW it's not easy to find out about R_HISTFILE in the help system or manuals, though, unless you already know it exists-- it only seems to be described under startup options, not things to do with history. However, Duncan's reply did hint at an inconsistency, in that savehistory() defaults to using a file called .Rhistory in getwd(), rather than using R_HISTFILE. I've modified my savehistory to default to R_HISTFILE if it exists, like so: savehistory_ function( file) { if( missing( file) && is.null( file <- Sys.getenv( 'R_HISTFILE'))) file &lt...
2001 Sep 28
1
savehistory: Suggestions to a \seealso{} (PR#1104)
Full_Name: Henrik Bengtsson Version: 1.3.1 OS: WinMe Submission from: (NULL) (130.235.2.229) I suggest the following \seealso to be added for savehistory: \seealso{ To execute \code{savehistory} automatically when \R quits see \link{.Last} and \link{.Rprofile}. } -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", &quo...
2004 Jul 28
2
problem with the .Rhistory
Hello, The history function doesn't seems to work when I am working with R. I have a .Rhistory file in my working directory and I have tried savehistory(file = ".Rhistory") or the command given in the history help : .Last <- function() if(interactive()) try(savehistory(".Rhistory")) and I get the same error message Error in savehistory(file) : no history available to save Is there any other vari...
2002 Apr 30
1
followup -- deficiencies in readline capability
...tion details. R is a collaborative project with many contributors. Type `contributors()' for more information. Type `demo()' for some demos, `help()' for on-line help, or `help.start()' for a HTML browser interface to help. Type `q()' to quit R. > debug(history) > debug(savehistory) > history() debugging in: history() debug: { file1 <- tempfile("Rrawhist") savehistory(file1) rawhist <- scan(file1, what = "", quiet = TRUE, sep = "\n") unlink(file1) nlines <- length(rawhist) inds <- max(1, nlines - max.show):n...
2009 Sep 05
1
Is 'history' recorded in Rscript?
Hi, I run the following command and try to save the commands that have been run in the script. But it seems that no history is recorded. Is it because that the history is not recorded in Rscript? Regards, Peng $ Rscript savehistory.R > f=tempfile() > f [1] "/tmp/Rtmp7WBjGG/file327b23c6" > history() Error in savehistory(file) : no history available to save Calls: history -> savehistory Execution halted
2004 Jan 30
0
savehistory() for ESS {was "ess and debug package"}
...: tcltk >> >mtrace(glm) # turns tracing on >> >names( tracees) # "glm" >> [1] "glm" >> >names( tracees) # "glm" >> [1] "glm" >> >glm(stupid.args) # voila le debugger >> Error in savehistory(file) : no history available to save >> >> Has anybody been more succesfull? StEgl> I also just tried this sequence from Angel, and got the same error StEgl> with the CVS version of ESS. (The sequence works fine when running R StEgl> from an xterm.) Yes,...
2008 Jan 14
1
savehistory in OSX version
...ing Version 2.6.0 GUI 1.21. Generally, I enjoy working with the OSX GUI, which has some very pleasant features. Kudos to the developers! There is a nice history panel which slides out of the Console window. The buttons on the panel work as expected. I am puzzled by the behavior of history() and savehistory() run from the Console window. I would think that these functions would view and save the same set of commands as those seen in the history panel, but they don't. Can someone explain why, and how to fix it? Perhaps relevant: I generally have performed a setwd() , or started R by launching...
2010 May 22
2
Capturing R console output into a file (sink+savehistory ??)
After reading more, I understand I didn't formulate my last question correctly, so please allow me to rephrase: What I am looking for is a way to save the R console session output. That is, a command that would combine the results of using: ?sink # And ?savehistory My motivation for this is that doing it will allow someone who is a blind user of R to be able to easily export his results to word so he could have word read him the text. I also imagine it might be useful for session login. Thanks, Tal ----------------Contact Details:-----------------------...
2004 Nov 02
4
Loadhistory problems
...not open when using File Load History. I notice that when they are saved they do not seem to have a file extension and there is no option to chose an extension. Is this a problem. Other than this it seems so simple that I can't see what the problem is. I've tried using loadhistory and savehistory with the same problems. The syntax guide for load history requires the file name, but doesn't specify if this should include and extension or what this should be. Where am I going wrong
2009 Apr 27
2
save history only option under Linux
Hi, I have a question regarding the R command options under Linux Is there any options that I can save history only? The only save option is --save, which saves both data and history. I don't want to save temporary data, because sometimes the it takes much time if the temp data is too big. However I want to restore the history for my next R session.. If there is no such option that meets my
2009 Aug 03
3
session logging
...an already open connection and at any rate I'd like both messages in the same file, just like on the console. People who run R at the unix command line apparently use the unix command -script-. But I mean something that will work within R, platform-independent. A 2003 post to R-help suggests savehistory(), but this does *not* save the console; I tried it just now. Another post from the same thread suggests using emacs. But that is not platform-independent. The existence of the 2003 thread suggests that this issue comes up periodically. Was it a deliberate design decision not to make logs availabl...
2008 Apr 13
1
.Rprofile, date tagging history, loading packages
Dear R-Helpers, I'm fiddling with my .Rprofile in Windows XP & R 2.7.0 Beta. I prefer to manually save my workspace but automatically save my command history via the .Rprofile. That is working fine once I found that "utils::" was required before the loadhistory & savehistory functions. What I would like to do is add a separator line with a date between the histories of each session. Something like, =====History for Sun Apr 13 09:43:50 2008 Is this possible? I have it print the date at startup, but that doesn't appear as part of the history. Also, I'm loading...
2012 Oct 10
2
history() does not work?
Hi, > history() gives Error in savehistory(file) : no history available to save although I can scroll throu history with C^uparrow an C^downarrow. How can I make history() work and/or show the current history in a file, so that I can choose from previous commands? The web did not throw up anything useful. TIA --Christian -- Christia...
2012 Jan 27
2
How to write the entire session to file?
savehistory writes all the executed lines from the session. How can I write everything (executed lines and output) from the active session to a file? Using Edit | Select All then Edit Copy, I can copy everything to the clipboard and write the whole thing to a file manually. If I just used the clipboard, I c...
2004 Nov 08
1
can one evaluate an expression in a comment? (or insert resultsinto history?)
But that doesn't put the result into the history buffer, to be written to a file only later when I savehistory(filename). Bert Gunter also suggested ?capture.output and ?textConnection, but I cannot see how to get text into the history buffer as comments, but with evaluated expressions (values). I know how to use paste, sink, write, etc. but nothing that I can see inserts into the history buffer. I'm...
2003 Jan 20
1
Command History
I have compiled R under Solaris 7 (SunOS 5.7) with the readline-4.0 library linked. Command line editing appears to work, but I cannot access command history. If I execute several commands in R, then type "history()", I get the error message "Error in savehistory(file) : no history available to save". Also, previous command recall (C-p) does not seem to work. I am invoking R directly from a Korn shell prompt. Can you help? Russ Pierce Legerity, Inc. Reading, PA -------------- next part -------------- A non-text attachment was scrubbed... Name: Russe...
2003 Dec 17
1
Session log file...
...ed to save a complete log of a R session we had in a seminar today... but I didn't succeed. 1) R | tee session.log This saves both input and output, but I do get the cursor key escape sequences from editing (cursor-up to get last command etc) instead of the actual command line executed. 2) savehistory Gets commands only, not the output 3) sink Gets output, without the commands producing them I'm sure I'm not the first one encountering this problem - there's for sure a solution, but I didn't manage to find it. If there is no such thing, would it make sense to add such a functi...
2006 Apr 11
1
pattern in history
...tils::history function for that purpose. I found it useful. I append the code ( I only added the two lines with #**) Romain. history2 <- function (pattern="", max.show = 25, reverse = FALSE, unique = pattern!="", ...) { file1 <- tempfile("Rrawhist") savehistory(file1) rawhist <- scan(file1, what = "", quiet = TRUE, sep = "\n") rawhist <- rawhist[grep(pattern, rawhist, ...)] #** if(unique) rawhist <- unique(rawhist) #** unlink(file1) nlines <- length(rawhist) inds <- max(1, nlines - max.show):n...