Is it possible to recover an R session if R needed to close due to an error? Is there a temp directory where sessions/data sits before its saved to a file?
What I’d really need is the history of input commands.
(running R version 2.12.1 on WinXP)
Based on answer to my question below, I still have the following question:
Where is R saving .Rhistory to?
I am not able to find this file, despite restarting a new R session and still having access to commands from a previous session. R reference page on SAVEHISTORY did not resolve this for me. It seems that R is storing this data in some temp file/folder that I don’t have access to. When I run the command tempdir(), I get a location of the temp directory, but not a single file is being stored there, whether during an active session, or after it closes.
Look at the working directory where you were working when R crashed and look for a file named “.Rhistory” I don’t know if every command will be there. But I’m sure that at least the last 50 are there.
HTH