More details and examples here…
http://www.codeproject.com/Articles/1087130/Understanding-the-Visual-Studio-IDE-for-R-language
12 March 2016
Here’s a fascinating development. See
I have tried other IDEs for R in the past (RStudio, RCommander), but never got much traction with them. Having R directly accessed from VS opens up all sorts of prospects for working with R and Ruby together.
The link to get RTVS (R Tools for Visual Studio) is
https://www.visualstudio.com/en-us/features/rtvs-vs.aspx
You need at least VS Community 2015 Update 1, and R 64 bit. VS Community is free to small enterprises (< $USD 1,000,000 last time I checked). I already had VS Community and R 64 bit installed, so I downloaded only step 2:
This downloads the setup exe RTVS_2016-03-04.1.exe. Run this for the actual install. Installation took only a couple of minutes. When complete, you are taken to
http://microsoft.github.io/RTVS-docs/installer.html
Follow the links there, especially Installation Steps, which takes you to
http://microsoft.github.io/RTVS-docs/installation.html
I did not have to do anything or change anything. After installation, on starting VS Community, I now have a new main menu item for R Tools:
To test it all works:
- Start a new VS project.
- Select the R template.
- Accept the defaults.
In the R Interactive window at the bottom left, enter plot(rnorm(100):
On pressing Enter, the plot appears in the R Plot window at the top right:
Here’s something a bit more useful:
Copy/paste this to the script.R window
x <- read.table(‘clipboard’, header = TRUE, row.names = 1, sep = ‘t’, dec = ‘.’) library(MASS) x y<-corresp(x, nf=3) y biplot(y)
In Ruby, Demo job, open the table r_EDU_INC and copy to the Windows clipboard as
Select the R script, right click and select Execute in Interactive.
The input table and scores are shown in the R Interactive window, and the correspondence analysis biplot is shown in the R Plot window:
Imagination is the only limit.
Comments are closed