On 28 Sep 2006 16:33:17 +0200, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > "Gabor Grothendieck" <[EMAIL PROTECTED]> 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?
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. ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel