Re: [R] History pruning

2008-08-22 Thread Richard M. Heiberger
We have different starting points. Please be sure that your modularity allows a cleaned region as well as a history log to be the input to your next step. The history log is incomplete; lines sent to the *R* buffer by C-c C-n are explicitly excluded from history. Lines picked up from a saved

Re: [R] History pruning

2008-08-08 Thread Ken Williams
On 8/8/08 1:04 PM, Greg Snow [EMAIL PROTECTED] wrote: Ken, Others have given hints on pruning the history, but are you committed to doing this way? Not necessarily. Only the starting point ending point really matter; I'd like to be able to start with a transcript of a bunch of aimless

Re: [R] History pruning

2008-08-04 Thread Ken Williams
On 8/1/08 1:13 PM, Richard M. Heiberger [EMAIL PROTECTED] wrote: I meant 5a 5b 5c. Multiple-line commands are handled correctly. What is is doing is looking for and + prompts. Anything else is removed. When I said 5c) prune any lines that don't have assignment operators I meant to

Re: [R] History pruning

2008-08-01 Thread Antony Unwin
JGR's Copy Commands command works well for me (even if it is both fascinating and embarrassing how little is sometimes left over). It retains only commands that worked, so it is still not the minimum possible. Antony Unwin Professor of Computer-Oriented Statistics and Data Analysis,

Re: [R] History pruning

2008-08-01 Thread Richard M. Heiberger
5a) save my entire history to a text file 5b) open it up in Emacs 5c) prune any lines that don't have assignment operators Ken Williams Research Scientist The Thomson Reuters Corporation Eagan, MN No one has yet mentioned the obvious. ESS does your 5a 5b 5c with M-x

Re: [R] History pruning

2008-08-01 Thread Ken Williams
On 8/1/08 12:40 PM, Richard M. Heiberger [EMAIL PROTECTED] wrote: 5a) save my entire history to a text file 5b) open it up in Emacs 5c) prune any lines that don't have assignment operators No one has yet mentioned the obvious. ESS does your 5a 5b 5c with M-x

Re: [R] History pruning

2008-08-01 Thread Richard M. Heiberger
I meant 5a 5b 5c. Multiple-line commands are handled correctly. What is is doing is looking for and + prompts. Anything else is removed. Here is a selection from the *R* buffer and the result after cleaning. It includes an example of par(). Rich *R* options(chmhelp = FALSE)

Re: [R] History pruning

2008-07-31 Thread Ken Williams
On 7/30/08 1:59 PM, Marc Schwartz [EMAIL PROTECTED] wrote: I (and many others) use ESS (Emacs Speaks Statistics), in which case, I have an R source buffer in the upper frame and an R session in the lower frame. I also use ESS to edit my R code (inside Aquamacs Emacs), but I usually use the

Re: [R] History pruning

2008-07-31 Thread Marc Schwartz
on 07/31/2008 08:35 AM Ken Williams wrote: On 7/30/08 1:59 PM, Marc Schwartz [EMAIL PROTECTED] wrote: I (and many others) use ESS (Emacs Speaks Statistics), in which case, I have an R source buffer in the upper frame and an R session in the lower frame. I also use ESS to edit my R code

Re: [R] History pruning

2008-07-31 Thread Ken Williams
On 7/31/08 11:01 AM, hadley wickham [EMAIL PROTECTED] wrote: I think that would be a very hard task - Well, at least medium-hard. But I think significant automatic steps could be made, and then a human can take over for the last few steps. That's why I was enquiring about tools rather than

Re: [R] History pruning

2008-07-31 Thread Duncan Murdoch
On 7/31/2008 2:08 PM, Ken Williams wrote: On 7/31/08 11:01 AM, hadley wickham [EMAIL PROTECTED] wrote: I think that would be a very hard task - Well, at least medium-hard. But I think significant automatic steps could be made, and then a human can take over for the last few steps. That's

Re: [R] History pruning

2008-07-31 Thread Ken Williams
On 7/31/08 2:12 PM, Duncan Murdoch [EMAIL PROTECTED] wrote: expression() returns a list of language objects, and we only asked for one. We can look inside it: Hey, cool. Now let me see if I can do anything useful with that. Thanks. -Ken -- Ken Williams Research Scientist The

Re: [R] History pruning

2008-07-31 Thread hadley wickham
It's not really equivalent, natural language has ambiguities and subtleties that computer languages, especially functional languages, intentionally don't have. By their nature, computer languages can be turned into parse trees unambiguously and then those trees can be manipulated. But in

[R] History pruning

2008-07-30 Thread Ken Williams
Hi, I find that a typical workflow for me looks something like this: 1) import some data from files 2) mess around with the data for a while 3) mess around with plotting for a while 4) get a plot or analysis that looks good 5) go back through my history to make a list of the shortest command

Re: [R] History pruning

2008-07-30 Thread Marc Schwartz
on 07/30/2008 01:12 PM Ken Williams wrote: Hi, I find that a typical workflow for me looks something like this: 1) import some data from files 2) mess around with the data for a while 3) mess around with plotting for a while 4) get a plot or analysis that looks good 5) go back through my