Re: [R] Searching the console

2011-09-08 Thread Gene Leynes
searchhist = function(pattern){ histfile = tempfile() savehistory(histfile) myHist = readLines(file(histfile)) ret = myHist[grep(pattern, myHist)] return(ret) } searchhist('data') searchhist('^lm') searchhist('hist') On Thu, Sep 8, 2011 at 12:03 AM, andrewH wrote: > Is there

Re: [R] Searching the console

2011-09-08 Thread Duncan Murdoch
On 11-09-08 2:21 PM, andrewH wrote: Dear Sarah-- I am thinking mainly in terms of long programs run by cut-and-past or some other batch-like submission, where you can get back a lot of code, some program outputs, and some error messages, all in a big lump. I want tl look through that lump to lo

Re: [R] Searching the console

2011-09-08 Thread andrewH
Thanks Eik! I did not know about or remember history. I agree that it solves part of my problem, but I really want to be able to search my code and the things R has printed in response as a single block of text. I can cut-and-paste it into a text editor, but I was hoping that there was a way to do

Re: [R] Searching the console

2011-09-08 Thread andrewH
Dear Sarah-- I am thinking mainly in terms of long programs run by cut-and-past or some other batch-like submission, where you can get back a lot of code, some program outputs, and some error messages, all in a big lump. I want tl look through that lump to locate all the error or warning messages

Re: [R] Searching the console

2011-09-08 Thread Sarah Goslee
I'm not at all certain what you wish to search: R objects? Past commands? If the latter, others have offered suggestions. If the former, what about simply ls()? Or if you mean something else entirely, please clarify. Sarah On Thu, Sep 8, 2011 at 1:03 AM, andrewH wrote: > Is there any way to se

Re: [R] Searching the console

2011-09-08 Thread Eik Vettorazzi
Hi Andrew, maybe history() helps you? It also allows pattern search (using grep internally). hth. Am 08.09.2011 07:03, schrieb andrewH: > Is there any way to search the console during an interactive session? I've > looked and looked, and can not find one. In some add-on package, maybe? > > Sorr

Re: [R] Searching the console

2011-09-07 Thread andrewH
Thanks, Josh! I'm using TINN-R now, but I have been thinking of switching to ESS. Though perhaps TINN-R has a similar function -- I had been looking for consol functions, rather than editor functions. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Searching-the-console-

Re: [R] Searching the console

2011-09-07 Thread Joshua Wiley
Hi Andrew, If you use http://ess.r-project.org/ just go to the R buffer and type: C-s (CTRL + s) which will let you search through the console. You can use C-M-s (CTRL + ALT + s) if you want to search using regular expressions. Cheers, Josh On Wed, Sep 7, 2011 at 10:03 PM, andrewH wrote: > Is

[R] Searching the console

2011-09-07 Thread andrewH
Is there any way to search the console during an interactive session? I've looked and looked, and can not find one. In some add-on package, maybe? Sorry to be so basic, but help would be greatly appreciated. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Searching-the-c