I'm experiencing an issue where running all chunks in an R Markdown file suddenly stopped working. It changed today while I was coding, and is now consistently producing an error.
Setup:
RStudio 2026.05.0+218
Quarto 1.9.37
OS: macOS
Problem 1: Cmd+A + Cmd+Enter breaks at header
When I select all and run this is shown to me in the console:
> ---
+ title: "Title"
Error in -title : invalid argument to unary operator
This used to work without any errors or warnings.
Problem 2: Run All and Run All Chunks Above/Below do nothing
All Run All options in the menu produce no output and no error, they simply do nothing. Run Current Chunk works fine.
What I've tried (and didnt work):
Restarting R session/Terminating it
Restarting RStudio
Reinstalling RStudio
Testing with a new .Rmd file with only the default header
Testing on a second computer with an older RStudio version
What could cause Run All Chunks to stop working entirely? How can I fix this? This happened on two different machines, so it doesn't seem to be installation-specific.
Thanks for the reply! To clarify: I'm using R Markdown (.Rmd), not Quarto (.qmd), I only mentioned Quarto because it shows up in my RStudio version info.
The problem occurs even with a new .Rmd file with the default template when creating a new R Markdown document:
Update: I found the root cause of the "Run All Chunks does nothing" issue. An unclosed code fence (```) in one of my .Rmd files was somehow blocking chunk execution across other documents as well. Closing the fence it resolved the Run All Chunks problem.
However, the issue with Cmd+A + Cmd+Enter executing the header as R code still persists. Is this expected behavior? It did not behave this way previously.
I can't speak to previous behavior, but Cmd+A+Cmd+Enter (Cmd -> Ctrl here) does the same thing for me that you reported, and it seems reasonable to me. Cmd+A highlights the entire file, including things that are not R code. Cmd+Enter expects to be running R code, not knitting a document or running just selected chunks of the highlighted text. I always use one of the "run chunks" commands when seeking to execute code in an Rmd file.