?'`' shows the following:

"Single and double quotes delimit character constants. They can be
used interchangeably but double quotes are *preferred* (and character
constants are printed using double quotes), so single quotes are
normally only used to delimit character constants containing double
quotes."

It is not clear to me why double quote is preferred (I don't think
that "character constants are printed using double quotes" should be
the reason, in the sense that single quote can be used for printing if
we want to do so). It seems that double quote and single quote can be
used interchangeably, except that "Single quotes need to be escaped by
backslash in single-quoted strings, and double quotes in double-quoted
strings."

Could somebody why double quote is preferred?

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to