[Rd] no carriage returns in BATCH output from 2.15.0

Duncan Murdoch murdoch.duncan at gmail.com
Sun Apr 15 22:06:31 CEST 2012


On 12-04-15 1:41 PM, Uwe Ligges wrote:
>
>
> On 15.04.2012 18:55, Patrick Burns wrote:
>> It seems like I must be missing something
>> since I haven't been able to find mention
>> of this.
>>
>> Under Windows 7 I'm not getting carriage returns
>> in the output of BATCH files using 2.15.0 (both
>> 64-bit and 32-bit). They are in the startup
>> messages, but not for the real output. Is this
>> on purpose?
>
> This is probably a CR/LF issue - and you editor does not interpret
> Unix-like line endings correctly.

The problem is that R writes CR/LF on some lines, just LF on others.  I 
see this in 2.15.0 and R-devel.  I'll try to track it down.

To reproduce, I put these lines into test.R:

x <- 1
x
2

and then ran

Rcmd BATCH test.R

The test.Rout file has the messed up line endings.

Duncan Murdoch



More information about the R-devel mailing list