The lintr
package has a check for single-quoted strings, and single quotes are discouraged elsewhere (e.g. ?Quotes
). Single and double quoted strings work identically in R, so is there a reason why single quotes are considered bad practice?
Citations to canonical documents especially welcome. To be clear: I'm asking about the reasons given by the R core team for discouraging single quotes; not about people's own opinions on the topic.
?Quotes
says so, if you like, but it will never affect code (aside from what you need to escape), so I'll likely continue to use single quotes to save on those extrashift
keystrokes. – Millrace