RStudio diagnostic error when using double quotes instead of single quotes

I am using RStudio 2024.04.2 Build 764.

When I select the RStudio Global Option Code/Diagnostics/Diagnostics for R/Show diagnostics for R, lines in a document that use double quotes for delimiting text show the red x diagnostics with messages such as "unexpected token" or "expected ',' after expression" . The messages go away if I replace the double quotes with single quotes.

Screenshot 2024-07-30 at 9.19.38 AM

The help for quotes states "... double quotes are preferred ... single quotes are normally only used to delimit character constants containing double quotes."

The TIdyverse style guide states

2.8.1 Character vectors ... Use ", not ', for quoting text. The only exception is when the text already contains double quotes and no single quotes.

It appears the double quotes are being ignored. Is this an error in the diagnostics or something else?

It is difficult to read a screenshot. Could you give use a reprex (Minimum Working Example) . See FAQ: What's a reproducible example (reprex) and how do I create one?

Thanks for the request. Turns out I had a missing " a few hundred lines earlier that I did not see.
My issue so will close.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.