From ggrothendieck at gmail.com  Sat Oct 17 23:25:13 2009
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Sat, 17 Oct 2009 17:25:13 -0400
Subject: [Rd] (PR#14012)
In-Reply-To: <20091017210301.GC1411@orange.local>
References: <20091016130010.3717A282EFF1@mail.pubhealth.ku.dk> 
	<20091017210301.GC1411@orange.local>
Message-ID: <971536df0910171425p6eb57a30t5d2abdc2acf78c66@mail.gmail.com>

Even though its not hard to convert files, I think it would be better
if R could directly handle different line endings since R tends to be
used in a cross platform way and its common to have files of different
line endings that originated from different systems.

On Sat, Oct 17, 2009 at 5:03 PM, Seth Falcon <seth at userprimary.net> wrote:
> * On 2009-10-16 at 15:00 +0200 sje30 at damtp.cam.ac.uk wrote:
>> I think Rscript has a problem running files that have mac encodings
>> for newline (^M rather than ^J on linux). ?If I source the file within
>> R, it works okay:
>
>> > source('j.R')
>> [1] "MEA_data/sernagor_new/CRX_P7_1.txt"
>>
>> But if I run the file using Rscript on a linux box I get a strange
>> error message:
>>
>> $ Rscript --vanilla j.R
>> "
>> Execution halted
>
> I think you are right that Rscript is unhappy to handle files with CR
> line terminators. ?But IIUC, the purpose of Rscript is to enable R
> script execution on unix-like systems like:
>
> ? #!/path/to/Rscript --vanilla
> ? print(1:10)
>
> So then I'm not sure how useful it is for Rscript to handle such
> files. ?Why not convert to a more common and portable line termination
> for your R script files?
>
>
> + seth
>
> --
> Seth Falcon | @sfalcon | http://userprimary.net/user
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] (PR#14012)
Gabor Grothendieck