R programming: Visual Studio vs. R Studio

R Tools for Visual Studio

I have been using R-Studio for a few years now to do my R coding and I like it a lot. It is a very good IDE for all kinds of R-related work. It integrates nicely with Shiny, markdown, etc…

Since a few weeks I am using Visual Studio with R tools since this client wants everything done in Microsoft technology. I am also using MRO, Microsoft’s R Open implementation (more info). Visual Studio has the same layout as R Studio and you can configure it acting and looking almost the same as R Studio:

Rtools_4.PNG

A few remarks

  • Initializing the project takes longer in VS.
  • It has a larger memory footprint (a few 100 MB).
  • Sometimes after hours working on it the response in the R interactive window is very slow and I needed to restart the program.
  • There are too many options in the menu not directly related to R. This is troubling for data scientists who have no experience with Visual Studio and its integration with products such as Team Services (version control):

Rtools_3.PNG

  • Debugging is a bit different, but works well. After setting your breakpoints, you have to Attach the debugger. You have the full power of the VS debugger where you can for example “break” when a variable has a certain value.
  • A very nice touch is the ability to explore your variables in Excel with a single click:Rtools_5.PNG

 

  • There are also specific templates to help you using R in a SQL environment:Rtools_6.PNG
  • It integrates seamlessly with Team Foundations Server (TFS) for version control.

Conclusion

People having used Visual Studio before will feel at home in the “R” version, for newcomers the number of (not needed) options might be a bit overwhelming.