Re: [Rd] Spurious output white line in R script (PR#8631)

From: Simon Urbanek <simon.urbanek_at_r-project.org>
Date: Wed 22 Feb 2006 - 19:19:04 GMT

I don't see the bug here ... you may want to explain how this behavior conflicts with the documentation. As of your problem, see below.

On Feb 22, 2006, at 1:41 PM, pinard@progiciels-bpi.ca wrote:

> I noticed that R scripts produce a spurious white line after output.
> For example, the following shell script,
>
>
> #!/bin/sh
> R --slave --vanilla <<EOF
>
> cat("Hello\n")
>
> EOF
>
>
> when made executable under the name ``hello`` along the search
> path, behaves
> like this:

>
>
> $ hello | od -bc
> 0000000 110 145 154 154 157 012 012
> H e l l o \n \n
> 0000007
>
>
>
> The second newline is not wanted, and I would like if R was not
> producing it.
>

If you don't want it, tell R to explicitly terminate in your script, e.g. with quit("no",0) - then there will be no new line.

Cheers,
Simon



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu Feb 23 06:24:26 2006

This archive was generated by hypermail 2.1.8 : Thu 23 Feb 2006 - 05:57:13 GMT