[R-SIG-Mac] \r in R.app console

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Apr 3 14:46:00 CEST 2008

I discovered empirically that cat("\r") in the R.app console emits a 
newline: is that intentional?  It is the only way of running R I have 
found for which that is true.  (The R Windows GUI and all terminals, even 
on Mac OS, just move to the beginning of the line.)

The reason for testing was txtProgressBar() in pre-2.7.0, which expects \r 
to do a carriage return, only (as documented in ?Quotes).  I could change 
this to use backspaces (less reliably), but it would seem better to make 
the console consistent with the documentation and e.g. Terminal.

Brian D. Ripley,                  ripley at 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

More information about the R-SIG-Mac mailing list