Execute from cursor to beginning of code block in RStudio

Viewed 133

Say the cursor is placed just after (cyl)in RStudio (as in top screenshot). Is there a way to run from the beginning of the code block to the cursor (as in bottom screenshot)?

enter image description here

enter image description here

1 Answers

My workflow in this situation:

  1. Shift (keep holding)
  2. push Arrow up (release button)
  3. push Pos1
  4. Release all
  5. Ctrl + Enter
Related