From p.dalgaard at biostat.ku.dk  Thu Sep 28 17:15:27 2006
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: 28 Sep 2006 17:15:27 +0200
Subject: [Rd] Warning on backslash sequences (was sprintf behavior)
In-Reply-To: <971536df0609280803p7e3f35e6jfd6daecfe31496ea@mail.gmail.com>
References: <20060925094613.B5FB64C91E@slim.kubism.ku.dk>
	<Pine.GSO.4.56.0609260959290.2640@durian.statsci.com>
	<Pine.LNX.4.64.0609270922370.19951@gannet.stats.ox.ac.uk>
	<Pine.GSO.4.56.0609270750050.3216@durian.statsci.com>
	<Pine.LNX.4.64.0609271718410.18168@gannet.stats.ox.ac.uk>
	<971536df0609280655t63ce8be2ie159aba2e6539bc4@mail.gmail.com>
	<x2odt0jc2a.fsf@viggo.kubism.ku.dk>
	<971536df0609280803p7e3f35e6jfd6daecfe31496ea@mail.gmail.com>
Message-ID: <x2fyecja40.fsf@viggo.kubism.ku.dk>

"Gabor Grothendieck" <ggrothendieck at gmail.com> writes:

> That's a good idea for the case I mentioned although there is still
> the case where one requires a single quoted string (maybe for
> generating code for some other language) and that is
> not handled by deparse.

Yes, but there be devils lurking in there. I think you do in general
need to know what the other language is. Take a look at shQuote(), for
instance. (Why, BTW, does that not simply "escape" single quotes using
'"'"' instead of switching to double-quotes and escaping everything in
sight?)

-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




[Rd] Warning on backslash sequences (was sprintf behavior)
Peter Dalgaard