Announcing RStudio v1.0
I&#x27;ve been co-teaching a class in computing for statisticians this semester (some details on the previous iteration here <a href="https:&#x2F;&#x2F;www.refsmmat.com&#x2F;posts&#x2F;2016-01-22-stat-computing.html" rel="nofollow">https:&#x2F;&#x2F;www.refsmmat.com&#x2F;posts&#x2F;2016-01-22-stat-computing.htm...</a>) and have mixed feelings about RStudio.<p>Most of our students use RStudio for their work. It&#x27;s convenient and easy. For developing standalone scripts or functions, rather than notebooks or R Markdown files, the typical workflow is to write code in a file, then run it in the current R session by selecting pieces and hitting &quot;Run&quot;.<p>But this encourages terrible practices. After a few iterations, the current environment does not reflect what&#x27;s written in the file. If students write tests in a separate file, they neglect to source in their functions, because they&#x27;re already in the workspace and so the tests run fine. Datasets that were loaded in the R console are used in code without being explicitly loaded there. Code gets changed without being run, or variable definitions are changed but old copies in the workspace accidentally used instead.<p>We end up getting many homework submissions that simply don&#x27;t run if you start them in a new R session. Pieces are missing, code is out of order, tests only run if you manually select the test code and run it. It only worked in the R session of the original author.<p>R Markdown is a decent step, since rendering the HTML should start a session from scratch, but when we&#x27;re asking them to write well-tested and modular algorithmic code, using R Markdown doesn&#x27;t really fit.<p>I&#x27;ve begun to appreciate DrRacket&#x27;s approach, where there is a &quot;Definitions&quot; pane and an &quot;Interactions&quot; window. When you Run the definitions, the current workspace is blown away and everything is defined from scratch from the Definitions, so there&#x27;s no lingering state from REPL interactions. (Unfortunately your REPL history is lost, which can be annoying.) You can&#x27;t run into the same inconsistent state as RStudio actively encourages.