R Programming using RTVS – Part 2

This article assumes that you have RTVS extension added to your VS IDE.  You can refer my previous blog on installation & configuration of RTVS.

Prerequisites:
1. Basic knowledge of R programming
2. RTVS Extension

Once you install ‘Data Science and Analytical Applications’ workload using VS2017 installer (May 2017 update), new R Project template will be available for creating new project.

RTVS_2

Those who are familiar with R Studio will certainly find themselves home with this IDE. Additionally we have all VS native features. Given below is a view that shows Solution Explorer, Script file (Script.R) and Interactive Window (Microsoft R Client which is equivalent to console in R Studio)

RTVS_3

Notice that there is an ‘R Plot’ tab which is where the plots/visualizations will be generated.

To start with lets draw a basic plot

ds <- c(1,500,300,100,350)
plot(ds)

RTVS_4.png

Alternately use the normal VS debug (starting new instance) and watch the interactive window as the plot is generated.

ds <- c(1,500,300,100,350) > plot(ds)
> rtvs::debug_source("~/visual studio 2017/Projects/rproject1/rproject1/script.R")
Sourcing: c:\users\geek2\documents\visual studio 2017\Projects\rproject1\rproject1\script.R
>

That’s basic start. I recommend R developers to explore the VS menu “R Tools” for the complete set of R integration options available.

Advertisements

2 thoughts on “R Programming using RTVS – Part 2

  1. Pingback: R Programming using RTVS – Part 3 | MSBLOGS | Biju Paulose

  2. Pingback: R Programming using RTVS – Part 4 | MSBLOGS | Biju Paulose

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s