This article assumes that you have RTVS extension added to your VS IDE. You can refer my previous blogs on installation & configuration of RTVS.
Prerequisites: 1. Basic knowledge of R programming 2. RTVS Extension
Key RTVS features that a developer should be aware of :
The following is just a list for you to explore rather than extensive walk through.
- Step through : use Ctrl+Enter
- Execute a block of code in R interactive : Select a block of code and Ctrl+ Enter (or right click and choose Execute in Interactive)
- Debug : Use Debug > Source startup file or F5
- Set Debug points : Native VS behavior (refer image below)
- Reset current work space : To clear everything by using R Tools > Session > Reset
- Examine variables : Use ‘variable explorer’ (Ctrl + 8)
- IntelliSense :
- Help : Use ? and ?? (Use ?? to search term in quotes if it include spaces)
- Code snippet manager : View them at Tools > Code Snippets Manager. Type the abbreviated name and use tab to insert a snippet to your code
- R interactive window or REPL (Read-Evaluate-Print-Loop) window : Use already illustrated in previous steps/posts
- Plot window : Ctrl + 6
- Plot history : Preserves all your plots in the session. R Tools > Plots > Plot History Window (refer image below)
There are many more which an R programmer or VS developer can explore themselves. We will go through some samples using RTVS in the upcoming posts.