[Rd] Quotation marks (PR#11353)

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu May 1 04:34:21 CEST 2008


On Wed, 30 Apr 2008, hadley wickham wrote:

>>
>>  Single (') and double (") quotation marks are not being read as quotation marks
>>  when commands are copied from Word; they produce an error message whenever they
>>  are used. To correct this, one has to retype everything in the R console. I
>>  tried using courier new, as well as the good old fashioned Times New Roman, but
>>  nothing seemed to work.
>
> Try turning off smart quotes.

(In Word.)

Put another way, what you are pasting are not ASCII quotation marks (as 
shown in your message) but unidirectional quotes, and they are not 
interpreted as quotation marks by the R parser.

Our students fairly rapidly get out of the habit of preparing R scripts in 
Word and use a syntax-aware editor -- usually Emacs+ESS -- because they 
see the benefits of e.g. parenthesis matching, automatic indentation etc.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list