R command history -- can it be like Matlab's?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

R command history -- can it be like Matlab's?

LosemindL
Hi all,

In R GUI window, if you use "up" and "down" key, you will be able to recall the previous and next command that has been used and stored in the command history cache.

But there is one inconvenience:

In Matlab, you can type the first a few characters of the command that you previously used,

and then press “up" key, you will be able to get to that previous command very fast,

no matter how long ago it has been used...

In R GUI, there is no such functionality.

Any thoughts on making R work my productivity?

----------------------

Also where do I find good debugger for R?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

Prof Brian Ripley
A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some people
not addicted to Matlab find the behaviour very inconvenient and prefer the
getline/readline behaviour (triggered by ^R/^S) of Rterm and R on Unixen.

On Tue, 29 Jul 2008, losemind wrote:

>
> Hi all,
>
> In R GUI window, if you use "up" and "down" key, you will be able to recall
> the previous and next command that has been used and stored in the command
> history cache.
>
> But there is one inconvenience:

Or an inconvenience of Matlab not shared by R, depending on your
preferences.

> In Matlab, you can type the first a few characters of the command that you
> previously used,
>
> and then press “up" key, you will be able to get to that previous command
> very fast,
>
> no matter how long ago it has been used...
>
> In R GUI, there is no such functionality.
>
> Any thoughts on making R work my productivity?
>
> ----------------------
>
> Also where do I find good debugger for R?
>
> Thanks!
> --
> View this message in context: http://www.nabble.com/R-command-history----can-it-be-like-Matlab%27s--tp18719530p18719530.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

hadley wickham
On Tue, Jul 29, 2008 at 2:45 PM, Prof Brian Ripley
<[hidden email]> wrote:
> A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some people not
> addicted to Matlab find the behaviour very inconvenient and prefer the
> getline/readline behaviour (triggered by ^R/^S) of Rterm and R on Unixen.

On unixen you can redefine your up/down arrows in your .inputrc:

"\e[A": history-search-backward
"\e[B": history-search-forward

which I find really useful, but it definitely takes a few weeks of
getting used to.  I suspect there maybe an equivalent for Rterm.

Hadley



--
http://had.co.nz/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

Rolf Turner

On 30/07/2008, at 9:16 AM, hadley wickham wrote:

> On Tue, Jul 29, 2008 at 2:45 PM, Prof Brian Ripley
> <[hidden email]> wrote:
>> A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some  
>> people not
>> addicted to Matlab find the behaviour very inconvenient and prefer  
>> the
>> getline/readline behaviour (triggered by ^R/^S) of Rterm and R on  
>> Unixen.
>
> On unixen you can redefine your up/down arrows in your .inputrc:
>
> "\e[A": history-search-backward
> "\e[B": history-search-forward
>
> which I find really useful, but it definitely takes a few weeks of
> getting used to.  I suspect there maybe an equivalent for Rterm.

        Those of us who (sensibly! :-) ) use vi have:

                set editing-mode vi

        in our .inputrc files.

        Then <esc> puts you into vi editing mode whence ``/'' searches
        ``forwards'' and ``?'' searches ``backwards'' --- with the convention
        that the most recent command is the ``top'' of the file.

        And then when you've found the command that you want, you can edit it
        (with vi syntax) before pressing <return> to re-issue the command.

        No home should be without one.

                cheers,

                        Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

hadley wickham
On Tue, Jul 29, 2008 at 4:39 PM, Rolf Turner <[hidden email]> wrote:

>
> On 30/07/2008, at 9:16 AM, hadley wickham wrote:
>
>> On Tue, Jul 29, 2008 at 2:45 PM, Prof Brian Ripley
>> <[hidden email]> wrote:
>>>
>>> A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some people
>>> not
>>> addicted to Matlab find the behaviour very inconvenient and prefer the
>>> getline/readline behaviour (triggered by ^R/^S) of Rterm and R on Unixen.
>>
>> On unixen you can redefine your up/down arrows in your .inputrc:
>>
>> "\e[A": history-search-backward
>> "\e[B": history-search-forward
>>
>> which I find really useful, but it definitely takes a few weeks of
>> getting used to.  I suspect there maybe an equivalent for Rterm.
>
>        Those of us who (sensibly! :-) ) use vi have:
>
>                set editing-mode vi
>
>        in our .inputrc files.
>
>        Then <esc> puts you into vi editing mode whence ``/'' searches
>        ``forwards'' and ``?'' searches ``backwards'' --- with the convention
>        that the most recent command is the ``top'' of the file.
>
>        And then when you've found the command that you want, you can edit it
>        (with vi syntax) before pressing <return> to re-issue the command.

And you might also want to beef up the size of your history file (and
automatically remove duplicates). I have the following in my
bash_profile (and I assume similar functionality exists for other
shells):

export HISTSIZE=1000
export HISTFILESIZE=5000
export HISTCONTROL=erasedups

Hadley



--
http://had.co.nz/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

LosemindL
In reply to this post by Prof Brian Ripley

Prof Brian Ripley wrote
A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some people
not addicted to Matlab find the behaviour very inconvenient and prefer the
getline/readline behaviour (triggered by ^R/^S) of Rterm and R on Unixen.

On Tue, 29 Jul 2008, losemind wrote:

>
> Hi all,
>
> In R GUI window, if you use "up" and "down" key, you will be able to recall
> the previous and next command that has been used and stored in the command
> history cache.
>
> But there is one inconvenience:

Or an inconvenience of Matlab not shared by R, depending on your
preferences.

> In Matlab, you can type the first a few characters of the command that you
> previously used,
>
> and then press “up" key, you will be able to get to that previous command
> very fast,
>
> no matter how long ago it has been used...
>
> In R GUI, there is no such functionality.
>
> Any thoughts on making R work my productivity?
>
> ----------------------
>
> Also where do I find good debugger for R?
>
> Thanks!
> --
> View this message in context: http://www.nabble.com/R-command-history----can-it-be-like-Matlab%27s--tp18719530p18719530.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

--
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Hi,

I don't find Glenn Davis's patch... where is it?

I like that Matlab feature. And I am using R GUI on windows...

Please help me!

Please also give me pointers to good R debuggers?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

Spencer Graves
      Regarding dubuggers,  RSiteSearch("debug", "fun") produced 183
hits for me just now.  The first two reference a "debug" package, while
the third describes the "debug" function in the "base" package.

      The "debug{base}" function is great, but not as good as the Matlab
debugger.  The "debug" package provides other useful functionality but
is harder to use.  I use the "debug{base}" function routinely and the
"debug" package only very rarely.

      Hope this helps.
      Spencer

losemind wrote:

>
> Prof Brian Ripley wrote:
>  
>> A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some people
>> not addicted to Matlab find the behaviour very inconvenient and prefer the
>> getline/readline behaviour (triggered by ^R/^S) of Rterm and R on Unixen.
>>
>> On Tue, 29 Jul 2008, losemind wrote:
>>
>>    
>>> Hi all,
>>>
>>> In R GUI window, if you use "up" and "down" key, you will be able to
>>> recall
>>> the previous and next command that has been used and stored in the
>>> command
>>> history cache.
>>>
>>> But there is one inconvenience:
>>>      
>> Or an inconvenience of Matlab not shared by R, depending on your
>> preferences.
>>
>>    
>>> In Matlab, you can type the first a few characters of the command that
>>> you
>>> previously used,
>>>
>>> and then press “up" key, you will be able to get to that previous command
>>> very fast,
>>>
>>> no matter how long ago it has been used...
>>>
>>> In R GUI, there is no such functionality.
>>>
>>> Any thoughts on making R work my productivity?
>>>
>>> ----------------------
>>>
>>> Also where do I find good debugger for R?
>>>
>>> Thanks!
>>> --
>>> View this message in context:
>>> http://www.nabble.com/R-command-history----can-it-be-like-Matlab%27s--tp18719530p18719530.html
>>> Sent from the R help mailing list archive at Nabble.com.
>>>
>>> ______________________________________________
>>> [hidden email] mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>      
>> --
>> Brian D. Ripley,                  [hidden email]
>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>> University of Oxford,             Tel:  +44 1865 272861 (self)
>> 1 South Parks Road,                     +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>>    
>
>
>
> Hi,
>
> I don't find Glenn Davis's patch... where is it?
>
> I like that Matlab feature. And I am using R GUI on windows...
>
> Please help me!
>
> Please also give me pointers to good R debuggers?
>
> Thanks!
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

Martin Maechler
In reply to this post by LosemindL
>>>>> "l" == losemind  <[hidden email]>
>>>>>     on Tue, 29 Jul 2008 12:23:36 -0700 (PDT) writes:

    l> Hi all,

    l> In R GUI window, if you use "up" and "down" key, you will be able to recall
    l> the previous and next command that has been used and stored in the command
    l> history cache.

    l> But there is one inconvenience:

as Prof. Ripley said already, this is only an inconvenience for
those who are used aka "addicted" to such behavior....

    l> In Matlab, you can type the first a few characters of the command that you
    l> previously used,

    l> and then press “up" key, you will be able to get to that previous command
    l> very fast,

    l> no matter how long ago it has been used...

"no matter how long"?  ...
      as of "ten years ago" ?
      ;-) ;-)

Anyway --- as nobody said so till now, and the vi-aficionados
have already raised the flag --- I'd like to remark that
the behaviour you desire has been the default behavior in ESS
(The "Emacs Speaks Statistics" plugin for Emacs,
 http://ess.r-project.org/ ) for many months now.

    l> In R GUI, there is no such functionality.

    l> Any thoughts on making R work my productivity?

leaving R GUI for ESS  :-) :-)

For Windows, there's a very nice package of Emacs, bundled with
ESS (and AucTeX, *the* recommended LaTeX plugin for Emacs)
thanks to Vincent Goulet, at
http://vgoulet.act.ulaval.ca/en/ressources/emacs/

Martin Maechler, ETH Zurich

    l> ----------------------

    l> Also where do I find good debugger for R?

    l> Thanks!

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

Gad Abraham-5
In reply to this post by Prof Brian Ripley
Prof Brian Ripley wrote:
> A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some people
> not addicted to Matlab find the behaviour very inconvenient and prefer
> the getline/readline behaviour (triggered by ^R/^S) of Rterm and R on
> Unixen.

Now that you've mentioned readline, it doesn't behave exactly the same
in Bash and R: if you press ctrl-r and then ctrl-c in Bash, it breaks
the search and you go back to the prompt as normal. In R on Linux (all
versions I've tried, 2.2 to 2.7.1), doing that returns you to the prompt
but you can't type anything, and the input buffer retains the text from
the search, so pressing enter makes the historical command run again.

Try this:
 > ls()
character(0)
[ctrl-r]
(reverse-i-search)`l': ls()
[ctrl-c, then enter]
 > ls()
character(0)


--
Gad Abraham
Dept. CSSE and NICTA
The University of Melbourne
Parkville 3010, Victoria, Australia
email: [hidden email]
web: http://www.csse.unimelb.edu.au/~gabraham

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

Bart Joosen
In reply to this post by LosemindL
Here is the post where Prof Ripley is reffering to:
http://tolstoy.newcastle.edu.au/R/e2/help/07/09/26668.html


Bart

losemind wrote
Prof Brian Ripley wrote
A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some people
not addicted to Matlab find the behaviour very inconvenient and prefer the
getline/readline behaviour (triggered by ^R/^S) of Rterm and R on Unixen.

On Tue, 29 Jul 2008, losemind wrote:

>
> Hi all,
>
> In R GUI window, if you use "up" and "down" key, you will be able to recall
> the previous and next command that has been used and stored in the command
> history cache.
>
> But there is one inconvenience:

Or an inconvenience of Matlab not shared by R, depending on your
preferences.

> In Matlab, you can type the first a few characters of the command that you
> previously used,
>
> and then press “up" key, you will be able to get to that previous command
> very fast,
>
> no matter how long ago it has been used...
>
> In R GUI, there is no such functionality.
>
> Any thoughts on making R work my productivity?
>
> ----------------------
>
> Also where do I find good debugger for R?
>
> Thanks!
> --
> View this message in context: http://www.nabble.com/R-command-history----can-it-be-like-Matlab%27s--tp18719530p18719530.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

--
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Hi,

I don't find Glenn Davis's patch... where is it?

I like that Matlab feature. And I am using R GUI on windows...

Please help me!

Please also give me pointers to good R debuggers?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

LosemindL
In reply to this post by Prof Brian Ripley

Prof Brian Ripley wrote
A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some people
not addicted to Matlab find the behaviour very inconvenient and prefer the
getline/readline behaviour (triggered by ^R/^S) of Rterm and R on Unixen.

On Tue, 29 Jul 2008, losemind wrote:

>
> Hi all,
>
> In R GUI window, if you use "up" and "down" key, you will be able to recall
> the previous and next command that has been used and stored in the command
> history cache.
>
> But there is one inconvenience:

Or an inconvenience of Matlab not shared by R, depending on your
preferences.

> In Matlab, you can type the first a few characters of the command that you
> previously used,
>
> and then press “up" key, you will be able to get to that previous command
> very fast,
>
> no matter how long ago it has been used...
>
> In R GUI, there is no such functionality.
>
> Any thoughts on making R work my productivity?
>
> ----------------------
>
> Also where do I find good debugger for R?
>
> Thanks!
> --
> View this message in context: http://www.nabble.com/R-command-history----can-it-be-like-Matlab%27s--tp18719530p18719530.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

--
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
HI I am using Windows RGUI... where do I find that patch?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

Peter Dalgaard
In reply to this post by Gad Abraham-5
Gad Abraham wrote:

> Prof Brian Ripley wrote:
>> A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some
>> people not addicted to Matlab find the behaviour very inconvenient
>> and prefer the getline/readline behaviour (triggered by ^R/^S) of
>> Rterm and R on Unixen.
>
> Now that you've mentioned readline, it doesn't behave exactly the same
> in Bash and R: if you press ctrl-r and then ctrl-c in Bash, it breaks
> the search and you go back to the prompt as normal. In R on Linux (all
> versions I've tried, 2.2 to 2.7.1), doing that returns you to the
> prompt but you can't type anything, and the input buffer retains the
> text from the search, so pressing enter makes the historical command
> run again.
>
> Try this:
> > ls()
> character(0)
> [ctrl-r]
> (reverse-i-search)`l': ls()
> [ctrl-c, then enter]
> > ls()
> character(0)
>
>
Not quite true that you can't type anything. What happens (for me) is
that you are still in reverse-i-search, so you can get this effect from
"^R l ^C d".

 >
(reverse-i-search)`l': ls()
(reverse-i-search)`l': ls()
 >
(reverse-i-search)`l': ls()
(reverse-i-search)`ld': levels(ftpain3) <-
list(none="none",intermediate=c("mild","medium"),severe="severe")

It snaps out of it if you press ^C twice.

--
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - ([hidden email])              FAX: (+45) 35327907

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

Gad Abraham-5
Peter Dalgaard wrote:

> Gad Abraham wrote:
>> Prof Brian Ripley wrote:
>>> A patch to do this was posted on 2007-09-29 by Glenn Davis.  Some
>>> people not addicted to Matlab find the behaviour very inconvenient
>>> and prefer the getline/readline behaviour (triggered by ^R/^S) of
>>> Rterm and R on Unixen.
>>
>> Now that you've mentioned readline, it doesn't behave exactly the same
>> in Bash and R: if you press ctrl-r and then ctrl-c in Bash, it breaks
>> the search and you go back to the prompt as normal. In R on Linux (all
>> versions I've tried, 2.2 to 2.7.1), doing that returns you to the
>> prompt but you can't type anything, and the input buffer retains the
>> text from the search, so pressing enter makes the historical command
>> run again.
>>
>> Try this:
>> > ls()
>> character(0)
>> [ctrl-r]
>> (reverse-i-search)`l': ls()
>> [ctrl-c, then enter]
>> > ls()
>> character(0)
>>
>>
> Not quite true that you can't type anything. What happens (for me) is
> that you are still in reverse-i-search, so you can get this effect from
> "^R l ^C d".
>
>  >
> (reverse-i-search)`l': ls()
> (reverse-i-search)`l': ls()
>  >
> (reverse-i-search)`l': ls()
> (reverse-i-search)`ld': levels(ftpain3) <-
> list(none="none",intermediate=c("mild","medium"),severe="severe")
>
> It snaps out of it if you press ^C twice.
>

If try typing after a ctrl-C in reverse search mode , nothing displays,
and the console beep sounds. It doesn't matter how many times I press
ctrl-C, the same happens. The only way out of it is to press either
enter (which shows the previously highlighted command ls and then runs
it) or to use the up key, and then ctrl-C.

I'm using Ubuntu Hardy.

 > sessionInfo()
R version 2.7.1 (2008-06-23)
x86_64-pc-linux-gnu

locale:
LC_CTYPE=en_AU.UTF-8;LC_NUMERIC=C;LC_TIME=en_AU.UTF-8;LC_COLLATE=en_AU.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_AU.UTF-8;LC_PAPER=en_AU.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_AU.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

--
Gad Abraham
Dept. CSSE and NICTA
The University of Melbourne
Parkville 3010, Victoria, Australia
email: [hidden email]
web: http://www.csse.unimelb.edu.au/~gabraham

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: R command history -- can it be like Matlab's?

Peter Dalgaard

>> Not quite true that you can't type anything. What happens (for me) is
>> that you are still in reverse-i-search, so you can get this effect
>> from "^R l ^C d".
>>
>>  >
>> (reverse-i-search)`l': ls()
>> (reverse-i-search)`l': ls()
>>  >
>> (reverse-i-search)`l': ls()
>> (reverse-i-search)`ld': levels(ftpain3) <-
>> list(none="none",intermediate=c("mild","medium"),severe="severe")
>>
>> It snaps out of it if you press ^C twice.
>>
>
> If try typing after a ctrl-C in reverse search mode , nothing
> displays, and the console beep sounds. It doesn't matter how many
> times I press ctrl-C, the same happens.
I think this depends on what is in your history. At least typing 's'
should do something if you had an 'ls()' previously.

> The only way out of it is to press either enter (which shows the
> previously highlighted command ls and then runs it) or to use the up
> key, and then ctrl-C.
Now that is actually true for me too. I must have hit "up" after the 2nd
^C.

>
> I'm using Ubuntu Hardy.
>
And I Fedora 9, but I'm pretty sure this is generic to systems that use
libreadline.


--
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - ([hidden email])              FAX: (+45) 35327907

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.