[R] Why Rscript behaves strangely with file name starting with 'size'?

Allan Engelhardt allane at cybaea.com
Thu Jul 8 08:49:29 CEST 2010


It looks like a bug in R, not Rscript: what Rscript does is effectively

R --file=size.R


and you can easily test that

echo 'print("Hello world")'>  size.R
R --file=size.R


give you the error while

cp size.R asize.R
R --file=asize.R


works as expected.

None of which helps you directly, but perhaps one of the developeRs can 
help fix what seems to be broken options parsing in the R code.

Allan

On 08/07/10 04:43, thmsfuller066 at gmail.com wrote:
> Hello All,
>
> It seems weird to me that Rscript does the following thing and enters
> the R prompt mode. If I change the file name to something that doesn't
> start with 'size', then Rscript runs normally. Does anybody know what
> is going on?
>
> $ Rscript size.R
> WARNING: '--file=size.R' value is invalid: ignored
>
>    
>>      
>
> $ Rscript --version
> R scripting front-end version 51072
>
>



More information about the R-help mailing list