BUSINESS INSIGHTS

Jan 04, 2017

3 Reasons to Consider Microsoft’s R Tools for Visual Studio

David Eldersveld Posted by David Eldersveld

Early in 2016, Microsoft announced the public preview of R Tools for Visual Studio (RTVS), an add-on R environment that integrates into Visual Studio. Unfortunately, in the R universe, the dominant R IDE is R Studio, and the odds of Microsoft displacing R Studio are slim. So why create R Tools for Visual Studio?

iStock-500877286edited.png

Even with core similarities and the progress that RTVS has made since it was released, R Studio is still clearly a winner when it comes to functionality. In its current preview, RTVS has a similar user interface to R Studio (if you use the Data Science Settings). Writing and running R scripts, viewing plots, or using and publishing R markdown is about all that you do from a language perspective in RTVS. Admittedly, that could be enough for many R users, but that is where comparisons end. Once you get into the realm of writing Shiny apps, building your own R packages, and more, R Studio shines where RTVS has not even begun to try to compete.

Additionally, many critical developers and data scientists are driving the wider adoption of R work and have connections to the continually improving R Studio IDE as well as R Studio’s evolving suite of R packages. I do not see RTVS versus R Studio as a David versus Goliath scenario where RTVS will eventually supersede R Studio, or even try to. Rather, in the right circumstances, providing the core functionality and a similar user interface to the more dominant IDE would allow users to easily use one or the other depending on their project needs.

Here are three reasons it may benefit you or your team to consider R Tools for Visual Studio for Microsoft-oriented analytics or data science projects. Ultimately, each reason comes down to convenience.

1. Code snippets targeted toward Microsoft R Server
If your organization is using or considering the use of R in the context of Microsoft R Server (MRS) or SQL R Services, RTVS may be a good choice because of conveniences like the built-in code snippets. R Studio supports snippets, but it is nowhere close to Visual Studio’s built-in snippets. Microsoft has an interest in driving people toward MRS while R Studio does not. It makes sense to include proprietary snippets in RTVS to help with adoption and use (RTVS also includes a variety of snippets for open source R). Whether you are just getting started with MRS or an established user, the built-in snippets (shown below) are extremely convenient for various MRS and open source functions.

R tools.png

2. Incorporate R projects as part of a broader Visual Studio solution
Many Visual Studio solutions end up being a collection of individual projects. More often than not, these projects are logically joined by virtue of being part of the same business solution, but each one can incorporate different components or languages. For example, you may architect a solution that involves separate projects for loading data­­ with Azure Data Factory, analysis with R, a front-end C# web app, etc. Rather than keep your R code siloed off in a separate solution, unite it with the rest of your code for development and source control.

3. Terrific IntelliSense
As with snippets, R Studio supports code completion, but it does not rival Visual Studio’s IntelliSense. Unless you are a skilled R developer, you might share in my experience. With R, I regularly find myself looking through Help to get syntax or function-specific information. Part of it is because I’m not using R all the time (so I forget things), and part of it is because I use a variety of languages and technologies (so I often end up confusing my syntax). I often rely on the use of “?” or “??” to search R, or I perform external web searches. With RTVS, I was immediately aware of how much less I relied on external help or syntax checks while writing R code, and the reason was Visual Studio’s superior IntelliSense, as shown below.

R tools1.png

As mentioned, these three reasons should not convince people to stop using R Studio, as that was not the goal. However, if the circumstances are right, it could benefit you or your team to consider R Tools for Visual Studio. Particularly if R is only a small component in a more extensive architecture, if you are already a “Microsoft shop”, or if you are using Microsoft R Server – the benefits of rapid and convenient development in RTVS can be greater than using R Studio alone.

If you need help implementing RTVS, or have questions about the other benefits that come along with the tool, contact BlueGranite today and we will be happy to help.

Exploring RTVS
David Eldersveld

About The Author

David Eldersveld

David is a Senior Consultant and Microsoft MVP who has employed skills in technology development, data integration, data analysis, and systems analysis for over ten years. David enjoys building BI and advanced analytics solutions with technologies such as SQL Server, Microsoft R, and Power BI. He is active in various technical communities. In addition to blogging for BlueGranite, he also writes at dataveld.com.

Latest Posts

Exploring RTVS