Re: [Rd] Warning on backslash sequences (was sprintf behavior)

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Thu 28 Sep 2006 - 14:33:17 GMT

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

> One area where a problem might appear is if one is
> generating R code, e.g.
>
> paste("a <-", dQuote("xyz")) # wrong!
>
> since in UTF-8 dQuote (and sQuote) do not necessarily
> generate double quotes (and single quotes) so one winds
> up using double quotes within single quotes or else
> backslash-protected double quotes within double quotes.
>
> If there were an argument on dQuote and sQuote to
> specify that they should generate double and single
> quotes acceptable for code regardless then that would
> help in this instance.

deparse() would be more to the point, would it not?

-- 
   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@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri Sep 29 00:40:32 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 28 Sep 2006 - 15:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.