Save script without sourcing

rstudio

#1

I have a really stupid question.

I’ve been using RStudio for 1.5 years and my usual workflow goes like this:

  • Write script in RStudio. Then Save (CTRL + S)
  • When I want to run it, I source the whole file. (CTRL + Shift + S).

But since a couple of days, RStudio seems to source the file every time I only trie to save it (CTLR + S).

I haven’t changed anything about the options and the Keyboard Shortcuts, the shortcuts still look as before.

I upgraded to the latest RStudio version today, but that didn’t solve it either.

Any ideas?


#2

Check that you have not ticked the Source on Save option, which as the name suggests does indeed source every time you save. The setting is persistent, so if you do select it then close your current R Studio session it will remain selected the next time you open R Studio.

sourceonsave

Simply untick it again if you have.


#3

Yes indeed, that was it! Thanks a lot.