[R] R console not echoing input

Duncan Murdoch murdoch.duncan at gmail.com
Mon Jul 3 22:17:51 CEST 2017

Hi Mik.

Likely you executed sink(...) to redirect output somewhere.  You undo 
that with sink().  You can compute how many such sinks are in effect 
(they stack) using sink.number(), but you probably won't be able to see 
the output, so that's  more useful in something like

while (sink.number() > 0) sink()

than in providing useful information.

Duncan Murdoch

On 03/07/2017 4:13 PM, Professor Bickis wrote:
> I have a weird problem running R.app 3.3.2 under Mac OS X 10.10.5.
> I was trying to interrupt a command line using various Control codes until I discovered that “Esc” is the escape key.  (Makes sense!)
> Now I find that while I can enter new commands to R, they no longer echo back, so I cannot see what I am typing.  On unix terminals CTL-Q will reset this, but it does not seem to work on the R console.
> I tried
>> system("stty echo")
> but was told
> stty: stdin isn’t a terminal
> So I tried the following, but it did not give me any info I can use.
>> isatty(stdin)
> [1] FALSE
>> stdin()
> description     class           mode    text    opened          can read        can write
> "stdin"         "terminal"      "r"     "text"  "opened"        "yes"           "no"
>>       stdout()
> description     class           mode    text    opened          can read        can write
> "stdout"        "terminal"      "w"     "text"  "opened"        "no"            "yes"
> What have I done, and how can I reset it?
> I know I can quit the R session and start again, but if I have lots of graphics windows on the screen, I don’t want to lose them all and have to recreate them, not to mention having to play with the par parameters again.
> Mik Bickis
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

More information about the R-help mailing list