Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Announcing R Tools for Visual Studio (technet.microsoft.com)
279 points by brettcannon on March 9, 2016 | hide | past | favorite | 83 comments


Hi folks - Last year we polled HN on whether there'd be interest in R integration in Visual Studio. You said "YES!", so here it is! I'll be around in case you have any questions.

BTW RTVS was built by the same group that made PTVS (Python Tools for VS) and NTVS (Node.js Tools for VS). RTVS will also be free & open source of course.

Cheers


" RTVS will also be free & open source of course."

Ten years ago I would have never thought I'd say this, but I am really liking Microsoft these days. Great work!

(here's the repo: https://github.com/Microsoft/RTVS)


I welcome RTVS, but as an Rstudio user, I am now curious about what things are _substantially_ different between the two. They're, at least superficially, very similar.

In other words, why would an Rstudio user consider a switch to RTVS?


RStudio is a fantastic IDE. It's been under development for years by some of the smartest ppl in the R community. it's currently decidedly better than RTVS. There are things here & there that RTVS might be better at, but this mvp was mostly about getting the heart-lung "IDE" features out. Some things you get w RTVS (partly courtesy of VS are):

* Multi-lingual: projects w C#, Python, SQL, etc.

* Multi-line repl: recall/edit/submit chunks of code

* Lots of add-ins: like 6,000 (hopefully a few are useful for R!)

* Upcoming integration w Excel, Azure ML, SQL, etc.

* etc.

If you are already a VS user, checking out RTVS is a no brainer.

But in summary, RStudio is better :). Hopefully we'll have some key differentiation features in upcoming releases.


Love the honesty and detailed answers. Looking forward to see the future of the product.


Tangent, but Hanselman, you, Meijers, et al are slowly but effectively changing the perception of Microsoft amongst my "live by the iPhone die by the MacBook" friends. Candor like this, good tooling[1] and community involvement/outreach. Y'all are already significantly more open than the Apple ecosystem - stick with it and my die-hard GPL fanboy friends might be the next converts[2] ;).

[1] Just absolutely fantastic tooling, every cent of that VS Ultimate license was worth it in engineering hours saved in one project just with the historical debugging function alone. [2] Haha, fat chance. Some of them went to law school just so they could work at the FSF. Either way, you guys are on a roll. Take out the Telemetry in Win10 though, you've almost captured the hearts, minds and market of that dev-demographic, but "Customer Service Profile Reporting" skeeves engineers out.


Could you expand a bit on what the nature of integration with Excel might be?


Sure. It can go from very basic:

* Right click on a data frame & "Open in Excel" (to view, chart, massage, etc.) but one way

to something more elaborate like we did for PTVS/Pyvot (two way):

* https://www.youtube.com/watch?v=Gu31s7kXPOg

to

* Using R as a scripting language in Excel, edited/debugged in RTVS (poke the Excel team pls ;))

to

* <your brilliant idea here!>


> Using R as a scripting language in Excel, edited/debugged in RTVS (poke the Excel team pls ;))

I imagine the Excel team is well aware of how embarrassingly weak the VBA language and Excel object model "quirkiness" is in the year 2016. I simply can't understand why they continue to let such a key platform languish.


Wow, new world indeed.

PTVS is fantastic, I'm glad to see it carried on.


What does this actually mean for F# from an MS perspective?


F# first-party support isn't going anywhere. R and F# hit two different demographics. If there's one thing MS is excellent at - it's long term support. There are enough research and financial institutions that I'd bet my 401k F# support stays the course (maybe even doing to OCaml/SML/etc what C# did to Java).


Microsoft is trying really hard to get me to like them again. It's starting to work.


While I'm somewhat ambivalent about Windows-only tools, it's nice to see R getting love from all the big players. The more market share and developers using it, the more the tools and implementation improves, and the better for all of us. Just finished an assignment using R Studio, Knitr and Plotly, so much less pain than Excel+macros or Stata.


After downloading this and installing I filled out a survey. One of the questions was about seeing this in VS Code. Yes, please. So there is hope.


I also vastly prefer R to Pandas, where the same functionality for plyr seems awfully verbose and unclear.


I definitely prefer R to pandas, dyplr and tools were soo much easier to use for subsetting dataframes and dealing with them, initially I thought python might be better because it was supposed to be easier, but boy was I wrong.


Thanks for mentioning dyplr. I've been struggling with pandas (can a library be more convoluted?) and will definitely give R a go.


Yeah out all the assorted packages that go with that, tidyr too.

Here's a cheat sheet https://www.rstudio.com/wp-content/uploads/2015/02/data-wran...


This definitely looks like something I need to check out. I do a lot of one off analysis for small bioinformatics projects,and I've taken to sharing results in the Microsoft ecosystem via OneNote. I've wrapped knitr into my own library (knoter) which generates the html and figures, and pushes the whole lot up to OneNote in the selected notebook. OneNote works well for this kind of collaborative analysis, where I need to keep track of the whole discussion somewhere.

One thing I'm missing from my workflow would be a way to integrate in to an IDE so I just push a button, and it'll commit the code to a gist, and push the output to a OneNote for other people to comment on. I'm wondering if it would be possible to fork this, and tweak the calls to knitr so they use my library instead.


Brilliant idea! We do take PR's :)


Does anyone have a short list of the best sites to learn R? I only have two on my list, and one is for advanced users:

http://adv-r.had.co.nz - Advanced R by Hadley Wickham

https://learnxinyminutes.com/docs/r/

I keep my links on Github: https://github.com/melling/ComputerLanguages/blob/master/r.o...


This is my more intro level book: http://r4ds.had.co.nz (it's still a work in progress, but you might find it helpful)


There is also the R Inferno "If you are using R and you think you’re in hell, this is a map for you": http://www.burns-stat.com/documents/books/the-r-inferno/



If you'd like more of an online classroom setting:

https://www.coursera.org/learn/r-programming (free to audit)



That's what I never understood about Microsoft. They're a software company. And some of it is absolutely horrible (Sharepoint), and some of it is the best in the business (Visual Studio).

There's a significant mindshare in Linux and Open Source. That being said, I don't understand why MS didn't provide Visual Studio, Office, and similar for Linux at a premium. For example, if Office was $499 for Windows, charge $999 for Linux. That way, they get the best of both worlds (use their software, pay them money). And their mindshare is significant as well, and this would increase it.

Maybe finally they are coming to their senses, doing just this. It's about time.


Technically speaking, Office already runs on a Linux platform -- Android. In fact, if you subscribe to Office 365, they almost* don't care where you run it, they're still being paid.

* = I suspect the reason behind not creating Office for Linux desktop is that: non-Android Linux desktops have too little market share to be worth the engineering effort / risk of cannibalizing Windows desktop sales. Whereas Android has huge market share and people were perfectly comfortably using Android even without Office. So in that narrow case it made sense to go where the users are.

And they can say that on Linux desktops, you can use a very compatible version of Office inside a browser.


I got to test this tomorrow at work, however loading up a huge program instead of a web page where all the stuff is stored on a server is going to require some changes in behavior.

And I usually work from Linux, so it will be in a VM. But I'll try :)


Understood. RTVS itself is 3MB's. Hopefully you won't have to install VS more than once or twice a year as it's several Gigs...

Speaking of a web page, our team also did "Jupyter notebooks as a Service" on Azure ML. You can fire up a notebook quickly and code away - essentially like tmpnb if you've used it, but your notebook is persisted.

we'll be adding more languages soon. Try one of the samples at: (no login), or start w blank notebook in the Azure ML Studio:

https://gallery.cortanaanalytics.com/browse/?categories=[%22...


Thank you, I will.

Is it easy to connect these to local data sources or do I have to upload csv's or something similar? Being a bank we store data locally in both PostgreSQL and MS SQL, although we are considering moving some stuff to Azure anyway. Just have to clear it with the legal guys!

I guess I can make a quick export of non personified data for testing though.


For Azure ML, some people use it fully in the cloud, others do local work in their favorite IDE, usually RStudio, then upload scripts, do their training, opertionalization, etc. on Azure. If you are using standard R, Python (eg scikit-learn) you can do work locally or on AzureML, but if you want to use Azure ML's own algos, then they're available only on the cloud.

There are also some sample experiments + data on Azure ML that you can check out quickly (no log in):

https://gallery.cortanaanalytics.com/experiments


Where is the link to this exactly? I only see things like the following, which still require rolling a VM and setting it up yourself:

https://azure.microsoft.com/en-us/documentation/articles/vir...


Sweet, If this works on the free community edition I'm gonna try it for sure.


It definitely does! In fact with the Community Edition it becomes a perpetually free R IDE.

edit: see gnoway's comment below tho.


* For personal use, or organizationally for academic purposes, classroom learning and open source projects only. Or if your company has <250 PCs or <$1mm in annual revenue, up to 5 people in your organization can use Community.

https://www.visualstudio.com/support/legal/mt171547


Correct, CE version has restrictions. It's great for checking out RTVS to decide if you want to upgrade to Pro/Enterprise.


Which kind of defeats the fact that RVTS is free and open source, but is still fundamentally understandable in terms of Microsoft's strategy in this area.


It doesn't defeat the fact at all. The number of users who can now use it for free is much greater than before (zero).


Yes. Hopefully when/if we doe VSCode/R it'll be fully open source.


This looks stunning. Anyone know how it compares to RStudio? I might virtualize Windows to use this.


Why not Visual Studio Code?


An excellent question! Please take this survey so our mgmt hears you :)

https://www.surveymonkey.com/r/RTVS1


Stupid question, is it possible to take an R script and compile it to a .net CLR dll?


No, and not a stupid question at all :) This isn't an "IronR", rather RTVS simply calls out to whatever R interpreter that you have installed on your machine (and that is configurable if you like switching between different interpreters / versions).


Bring the VCF from Azure ML to Visual Studio! I said it in the survey too. VCF is very important in some settings. Being able to code R + SQL and have workflow components in the same environment would be a killer feature.


I think you are referring to WCF? Basically being able to create a model, then operationalize it on the cloud for mass usage?

If so, the good news is that you can do that with RTVS, thanks to the R SDK. Basically you create models locally, test/debug them, then zap that onto Azure ML's backend. The SDK itself isn't tied to RTVS in any way. You can use it from RStudio, Jupyter/R, vim, ... if you like.

R SDK: https://cran.r-project.org/web/packages/AzureML/index.html

Regarding your 2nd question - RTVS/SQL integration - yes, that's definitely coming too. For this initial release we just wanted to make sure we got the core IDE functionality right...


No, I mean Visual Composition Framework (it's a Gartner name). It is drag and drop components just like Rapid Miner, Alteryx, KNIME or Azure ML. However the tools that perform those things now are standalone and I have to switch between 5 or so different tools to get my job done.

Kind of like SQL Server Integration Services but instead of SQL Server, target Azure ML.


Aha, my bad. Yes, for certain scenarios it makes sense to have a drag/drop paradigm, for some a REPL++ like Jupyter, and sometimes an Editor. That's exactly why we decided to integrate Jupyter w Azure ML. This is going the other way around and makes total sense. The ideal as you've noted is figuring out how to integrate the three canvases intelligently so that you don't have to "alt-tab" between disjoint worlds constantly. Meanwhile I've added it to the feature list:

https://github.com/Microsoft/RTVS/issues/1237


Looks like a promising alternative to Rstudio on a Windows platform. If only it was available on Linux...


Team lead here - yep, we'd love to do a VSCode/R version as well. If you want to lend a voice, take our R IDE survery and upvote that question:

https://www.surveymonkey.com/r/RTVS1


Visual Studio will be coming to Linux


There are no such plans. But we have VS Code, which is great lighter weight IDE that's cross platform. Check it out here:

https://code.visualstudio.com/

It has great support for js, node, go, .net etc. already. We'll hopefully add Python & R support soon.


I've heard a great number of rumors regarding bringing Visual Studio (full) to Mac OS X and Linux. Many from Microsoft folks. Not saying they have to be true but I should be shocked if it wasn't at least being researched and looked at.


Personally speaking I would love for that to happen. There is room for both an XL IDE and a XS IDE imho.


Really?


Any plans for a 32 bit version? We need our 32 bit R studio install to be able to run in parallel with this as we test this and we cannot switch Java versions from 32 to 64 bit which some pkgs we use require. Congrats on the public release.


Might try this out as I've had nothing but issues with the Windows version of RStudio.


Microsoft is getting better and better, this is the rise of a new company.


Personally never did R studio. Unfiltered command line is always more flexible, and prevents inertial lockin to a specific tool, OS, to a large extent. Now I'm supposed to do R in ultra-bloated Visual Studio?? I learned R precisely to get away from the inefficiency of the (in the past 20 years, functionally unchanged, visual-candy-only) Excel. How am I to be excited about adding this thick, lumpy MS gravy, to my pure R experience? So that when I do R on Linux or remotely I'm screwed? No thanks.

Addendum: Clearly the hive mind MS corporate drones are out in force today/tonight. I know everybody is enamoured with MS-Eclipse etc but R is best used unfiltered. Not hijacked into the laughable world of Windows and Visual Studio. I know from bitter experience that the Windows versions of R are terribly unstable by comparison with the Linux builds. I learned the latter precisely for that reason. MS is playing a fantastic marketing game but I was agnostic on platform until R on Windows started showing its catastrophic limitations. It's a second class citizen as soon as you venture beyond the basics. Take it from an ex R-on-Windows guy who uses R 10 hours per day.


> R is best used unfiltered

Actually, no it's not.

One of R's strengths is its ability to manipulate data and then visualise the output. Doing this via the command line is slow and cumbersome. Do you plan to output a chart, save it, then open it with another application?

RStudio excels in not just being an IDE, but also a visual data representation tool. Write the R code, view the chart in the same application (Rstudio), tweak until happy, then save. It's a much smoother iterative process.

I'd be prepared to believe that perhaps a command line champion could manage libraries and develop code direct from the R interpreter, as well as I can using RStudio. However, I can't see how one could possibly produce the same quality data visualisation working directly at the command prompt.

I don't know about Visual Studio, I don't use it, but your criticism of RStudio is wide of the mark.


What are you talking about? The text-based R interpreter has exactly the same graphical capabilities as R Studio.


I'm talking about RStudio being a much better tool for data visualisation.

If people wish to stick with the command line, I won't dissuade them. I just personally find there are better tools for producing data visualisations with R.


ah, but the path less trodden has its own rewards. The purity of the command line, the sparsity of it all it, unpolluted by decadent convenience-cruft, is satisfying in itself. Approach the heart of the machine!


That's not where RStudio outperforms console R. You don't have to save a chart and open it with some other program, it opens a dedicated window for plots that you can put anywhere you want. Functionally it's the same thing.

RStudio shines when it comes to viewing data, global variables, and command history. Personally, I found the editor itself to be far too restrictive so I switched back to emacs and the command line. Also, as far as I know there's no way to get a true dark theme in RStudio where the entire application is dark, not just the code.


Oh please. I do that 20x a day without R Studio. Saving a chart is as simple as png(...). You are clearly too mouse-bound. I reject your comment out of hand.


"You are clearly too mouse-bound."

Funny, I always thought personal computing not being about strict protocol but more like freestyle guitar playing where individual styles are not as important as the results of the techniques.


actually, while the idiom seems initially appealing that feestyle guitar would more closely resemble using the (superficially analogue) mouse than using a (clearly digital) keyboard, actually the opposite is true. That is because the mouse is limited to a small selection of prescribed onscreen choices, whereas the keyboard, while still being a digital medium (unlike the freestyle guitar - on that I agree), has a much, much wider palette of expressiveness thanks to the inevitably orders-of-magnitude greater combination of command combinations of which it is capable.


Aye, but using a well-designed program allows you to use both the keyboard and mouse simultaneously. Especially something like visual studio, you can create keybindings for damn near everything, set up macros, etc, plus still use the mouse for quick and dirty stuff. So a visual interface may be more like a two-necked guitar, where some think it's a gimmick, and there's admittedly a bit of lost flexibility from both sides, but you gain more overall.


Or go cyborg like me! I have a 12 button Razer mouse on the right, and a Razer Nostromo (formerly Belkin) on the left with plenty of macros, and analog in the mix customized for each program.


Why save it at all when in RStudio you can skip that step. Doesn't have anything to do with a mouse either because you still write and execute all the code with the keyboard. This all seems very out of left field.


but you don't have to save it to view it under the command line.

  > plot(rnorm(100))
is not going to give you anything different under R-Studio, than command-line R, other than redirecting the identical output into a convenience window in its IDE. Sure R-Studio will save a history for you and throw a few conveniences at you but, command-line >plot(rnorm(100)) will popup a window on all OS versions of R and you'll be able to visualize all day long. Including multiple open charts. With selectable focus for further manipulation. R-Studio (MS-VS-RStudio) is just a very thin wrapper on something which is 100% there already. However, in return for nominal initial friendliness, it has the downside of sleepwalking you into a workflow which, if you don't understand what's going on underneath, will hold back your R learning curve.

Now IDEs are useful, if you understand the tradeoffs. They're a higher-level wrapper on stuff, with all the pluses and minuses that that entails. Higher-level = lower learning curve, greater immediate productivity, vs lower-level = higher learning curve, lower immediate productivity but greater long term power.


I would be interested in a concrete example of how you found command line R in Linux to be superior? I personally use R with RStudio on Windows and on the command line in a Linux cluster. I have found no differences, and am happy to use either, but tend to use RStudio because it suits my workflow better. Memory management in command line R on Linux seems better, but I don't run into that issue very often.


The command line is not superficially superior if all you are doing all day is interactively exploring data using R. In that case, R-Studio puts a layer of convenience around the workflow. But, like all reasons that the command line refuses to die across multiple applications (not just R), and is indeed in rude health, wrappers have their downside. They lock you in. They're higher level (lower flexibility). Being a non-essential surrogate technology, they're more prone to abandonment by the developers, which entails more risk to users. They're not doable easily remotely.

Most importantly, if your workflow becomes IDE based, especially on graphics, then you will have a dearth of skills for implementing actual production code that does not rely on a local workstation running a local copy of the IDE in graphical environment. You'll be short of the understanding of how the plumbing works, limiting you to the exploration role of a single-user guy, and you'll limit the shareability of your work.

Sure, R-Studio is great. But no, it's not an absolute good. It's a tradeoff. Know what you're giving up. Personally, I like to use the most generic, widespread version of tools as possible. I can SSH into any computer anywhere and be running R within minutes, with full familiarity with the environment.

By the way, clearly I'm in the minority, and that's the problem. R itself is open source, but R-studio is not. Microsoft has clearly taken a view that they can buy a large part of the R ecosystem, by buying this tool. I consider this to be a bit of a hijack, and that is the last reason why I dislike R Studio -> it is a vector for undermining open source software and in this case, R itself as open to all. All of a sudden, a large (possibly majority) slice of the user base is beholden to a for-profit company and all its incentives. Not me.


Great answer, thank you.


what phillc73 said.

Totally respect having a focused command line w no frills workflow. To each their own.

But you should really give RStudio a try. It's a beautiful, highly productive R IDE with many features that make writing R much much more pleasant.


Thank you for a balanced view. R studio is a great piece of software, and the command line also deserves respect.


It's quite true. Emacs has an R mode (ESS) and that is probably all you need. That said I think people are free to use whatever software they want, and this includes non-free software that is technically and philosophically inferior such as in this case.


I don't think the R Console or RStudio are going away. Feel free to keep using whatever you want. If you normally have VS open and you also use R then this news is great, otherwise, you get to keep going about your merry way.


Do you geddit that VS binds you to the inferior Windows builds of R? I use R every hour of every day. I started with Windows R with zero bias.....until I was forced to learn Linux against my will just to get the full, stable, all-libraries-work, experience.


Not sure what you mean - RTVS works with CRAN R...


No love for C11?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: