According to the documentation of the R, no difference for most applications, although double quotes are preferred:
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.
However, there are special cases where the order used to declare the quotation marks may lead to errors in the interpretation of the program. But in the traditional cases of using quotation marks, as simple string declaration, can be created using '
or "
without needing further care.
print("Ola, Mundo!")
## "Ola, Mundo!"
print('Ola, Mundo!')
## "Ola, Mundo!"
print("'Ola, Mundo!'")
## "'Ola, Mundo!'"
print('"Ola, Mundo!"')
## "\"Ola, Mundo!\""
print(""Ola, Mundo!"")
## Error: unexpected symbol in "print(""Ola"
print(''Ola, Mundo!'')
## Error: unexpected symbol in "print(''Ola"
Thank you very much!
– Luiz Alberto Carvalho
Dispose! Well formulated questions are a pleasure to answer.
– Marcus Nunes