From ripley at stats.ox.ac.uk  Thu May  1 04:34:21 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 1 May 2008 03:34:21 +0100 (BST)
Subject: [Rd] Quotation marks (PR#11353)
In-Reply-To: <f8e6ff050804301011n1a8c0aa3vff593fcc9f3ec74e@mail.gmail.com>
References: <20080430162009.CD1B82834169@mail.pubhealth.ku.dk>
	<f8e6ff050804301011n1a8c0aa3vff593fcc9f3ec74e@mail.gmail.com>
Message-ID: <alpine.LFD.1.10.0805010327020.30845@gannet.stats.ox.ac.uk>

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



[Rd] Quotation marks (PR#11353)
Prof Brian Ripley