From phgrosjean at sciviews.org  Tue Nov  5 17:02:19 2013
From: phgrosjean at sciviews.org (Philippe Grosjean)
Date: Tue, 5 Nov 2013 17:02:19 +0100
Subject: [Rd] cat with backspace and newline characters
In-Reply-To: <21112.61708.698124.149056@stat.math.ethz.ch>
References: <CAHavPHGe1A7R6RxD45exQnq7zJXWatiKQ8rR7SiFJBE2RGVQDQ@mail.gmail.com>
	<CADv2QyG6Nvn+YJ46Pz5PF7FqB9Q-LnEeLE4_EAgfVgBKo+EakA@mail.gmail.com>
	<CAHavPHH7VMYxBLjJsDO_2wwS-tC=gwbHiMfXVeP4fhXPZiJwNg@mail.gmail.com>
	<CAH7sKSN6a7ObU8g7xXf+fHq0cdMeKvsr7PSsorhNZ=DP3Pf8Ow@mail.gmail.com>
	<21112.61708.698124.149056@stat.math.ethz.ch>
Message-ID: <8E2469B4-2A7B-44DD-896F-F409C39F4496@sciviews.org>


On 05 Nov 2013, at 14:22, Martin Maechler <maechler at stat.math.ethz.ch> wrote:

>>>>>> Kenn Konstabel <lebatsnok at gmail.com>
>>>>>>    on Tue, 5 Nov 2013 13:25:20 +0200 writes:
> 
>> I just tried it on ubuntu but within RStudio:
>>> cat("abc\b")
>> ab
>>> cat("abc\b\n")
>> ab
>>> sessionInfo()
> 
> which --- as you allude to below --- shows that  RStudio  has changed R
> in so far that it adds a '\n'  even when R, i.e.  cat()  does not.
> 
> I can understand that the RStudio programmers want to protect
> their users (*) from getting funny looking output,
> but I still don't like the fact that R inside RStudio is tweaked
> to behave differently from regular R. 
> 
> Martin Maechler, R Core Team & ETH Zurich
> 
> --
> (*) or their software from malfunctioning when the console "looks ugly"

[?]

I agree with you Martin, but what is a "regular R"? Because on a Mac, R.app does exactly the same as RStudio:

> cat("abc\b")
ab
> cat("abc\b\n")
ab
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

And this is R.app 1.62 Snow Leopard build (6558).

So, does it means that R run under R.app on Mac OS X is *not* considered as a regular R?
Best,

Philippe
 



[Rd] cat with backspace and newline characters
Philippe Grosjean