4

I've just started using Quarto for first time in RStudio (I usually use Rmarkdown).

In Rmarkdown, I could select a line from a code chunk and use Ctrl + to evaluate it in the global environment. This was useful because it let test the behaviour of a line without requiring me to knit the document or run the entire chunk.

This shortcut does not work in Quarto documents in RStudio. Is there different keyboard shortcut which will let me a evaluate a single line from a chunk of code in a Quarto document?


Edit: some people are saying that the old shortcut should still work, so maybe this is a bug? I'll update this question when I know more (or perhaps delete the question and submit an issue should the need arise)

Currently using

  • R version 4.2.1 (2022-06-23 ucrt)
  • RStudio version 2022.07.1+554 (Spotted Wakerobin)
Captain Hat
  • 2,444
  • 1
  • 14
  • 31

1 Answers1

3

This is an RStudio bug on Windows 10

There's a known issue with Rstudio and the Quarto visual editor where pressing Ctrl + from a 'floating' window results in no code being evaluated, or code in a different window being evaluated. It's part of a wider bug where the connection between floating windows and the main window is severed.

The issue is due for repair in 2024. Until, then you'll need to do the following to restore normal shortcut functionality:

  1. 'Re-dock' the window you're editing using the 'Return to main window' button: enter image description here
  2. Close all other 'floating' windows
  3. Restart RStudio. Close the process completely; restarting the session will not work.
Captain Hat
  • 2,444
  • 1
  • 14
  • 31