[R] Unreasonable syntax error

(Ted Harding) ted.harding at wlandres.net
Tue Jun 21 09:25:15 CEST 2011


How long can a fortune be? Bill's response is fortune-worthy
in its entirety!

I would intensify his advice to "NOT to use Microsoft Word."
Note the Full Stop.

I will spare people the full catalogue of misfortunes I have
observed, but feel inclined to cite the case of someone to
whom I once sent a PostScript file, who, naively, opened it
in Word which, helpfully (as Bill emphasises), was in
"Autosave" mode. Within a few seconds the file was scrambled
beyond recovery. 

Best wishes to all,
Ted.

On 20-Jun-11 22:47:49, Bill.Venables at csiro.au wrote:
> The advice is always NOT to use Microsoft Word to edit an R file.
> That stuff is poisonous.  Microsoft word, typical of all Microsoft
> software, does not do what you tell it to do but helpfully does
> what it thinks you meant to ask it to do but were too dumb to do so.
> 
> Even notepad, gawdelpus, would be better.
> 
> When I look at your script the first sign of trouble I see is:
> 
> Error: unexpected input in:
> "     s[1,3,k]<- (0.1) * runif(1)+ 0.1; 
>      s[1,1,k]<- (0.02) *  runif(1)+ 0.98 ¨"
> 
> which is the spurious character Microsoft word has helpfully inserted
> to make it all look nice.  It's downhill all the way from there.
> 
> (R does not expect Microsoft Word, just as "nobody expects the Spanish
> Inquisition".  See http://www.youtube.com/watch?v=CSe38dzJYkY).
> 
> Bill Venables.
> 
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of james198877
> Sent: Tuesday, 21 June 2011 7:13 AM
> To: r-help at r-project.org
> Subject: [R] Unreasonable syntax error
> 
> http://r.789695.n4.nabble.com/file/n3612530/PSC.r PSC.r 
> 
> Hi all,
> 
> I just wrote a program in R by editing it in Microsoft Word and then
> pasting
> into the text editor of R. The above is the file.
> 
> And below is what the console complains.... Why doesn't it recognise
> 'r'??
> 
> I have to mention that at least when I typed this first several lines
> into
> the console, the first error didn't appear. I don't try the next errors
> as
> there would be too many lines to type...I'm not sure if this is
> something
> about Word
> 
> http://r.789695.n4.nabble.com/file/n3612530/lastsave.txt lastsave.txt 
> 
> Thanks a lot for your help!!!

--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.harding at wlandres.net>
Fax-to-email: +44 (0)870 094 0861
Date: 21-Jun-11                                       Time: 08:25:11
------------------------------ XFMail ------------------------------



More information about the R-help mailing list