Are double “” and single '' quotes (always) interchangeable in R?

前端 未结 3 725
情歌与酒
情歌与酒 2020-12-29 23:49

This is perhaps rather a minor question...

but just a moment ago I was looking through some code I had written and noticed that I tend to just use =\"something

3条回答
  •  一向
    一向 (楼主)
    2020-12-30 00:21

    According to http://stat.ethz.ch/R-manual/R-patched/library/base/html/Quotes.html, "[s]ingle 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."

提交回复
热议问题