R Projects

Similar to Python, when we installed the data science tools we get an “R” section in our templates. If you go there you’ll see something like this:

Only one template to choose from, but that’s ok! That is all we need.

R Interactive

Just like there’s a Python Interactive, there’s also an R Interactive window. It acts very similar to the Python Interactive, as well. Just highlight or put your cursor on the line in a script you want to send to the interactive and hit Ctrl+Enter. Of course, you can just type directly into the interactive to get some quick result or feedback on a piece of code. Oh, and there is syntax highlighting and intellisense right in the interactive!

Running R Code

Like all applications in Visual Studio, just hitting the green “Run” button will execute your code. And, just like with Python, you can set a breakpoint in your R code and debug through it.

Visualizations

Having R support in Visual Studio wouldn’t be useful if it didn’t support visualizations. Similar to RStudio, Visual Studio has a tab that’s used to display plots.

Luckily, R comes provided with quite a few sample data sets. To list them all just type in data(). Let’s look at a dataset called JohnsonJohnson, which is quarterly earning of Johnson & Johnson from around 1960 to 1980. Let’s use a scatterplot that also adds a curve.

scatter.smooth(JohnsonJohnson)

Pretty nice for just a small line of code! You can imagine how much more complicated the visualizations can get just by adding a bit more code.

R Markdown

R has a really nice feature to help distribution code, text, and visualizations with R Markdown. Pretty similar to Python’s Jupyter Notebooks, it also features a way to output to different formats, such as PDF and HTML. Visual Studio also has support for this, though it takes a little bit to set up. Microsoft has a nice documentation page that details all that you need to do. Now you can create R Markdown files in Visual Studio!

While you can output your R Markdown document in HTML, PDF, and Word, RStudio has a few more ways you can. It allows you to also output as an actual web site or a scientific article. Hopefully, Visual Studio can provide most of the other output types fairly soon.

Shiny Apps

One of the things I have a hard time trying to find are ways to deploy your models. Sure you can have everything local, but what’s good about that if no one else can see or use it? Well, the same team who brought us RStudio also has a very compelling feature for R to share your findings – Shiny. This framework allows you to create web applications to share your findings and, even better, to share your models for anyone to interact with. They also supply hosting for your web applications, so they have all that you need to get your findings and models out to the world.

Unfortunately, Visual Studio doesn’t support Shiny. Although, I really hope they will integrate better support for Azure in order to deploy web services that will call into our models and host web applications that use those web services.

Data Science With R In Visual Studio的更多相关文章

  1. SQL Server Data Tools – Business Intelligence for Visual Studio 2012安装时提示“The CPU architecture....”的解决方法

    SQL Server Data Tools – Business Intelligence for Visual Studio 2012,一个很强大的工具,下载地址:http://www.micros ...

  2. Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013 http://www.microsoft.com/en-us/download/details.aspx?id=42313

    Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013 http://www.microsoft. ...

  3. Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013 SSIS

    VS2012 SSDTBI_VS2012_x86_CHS.exe http://www.microsoft.com/zh-CN/download/details.aspx?id=36843 VS201 ...

  4. Visual Studio 2015 Update 2

    Visual Studio Community 2015(带Update2)(社区版,针对个人免费): 简体中文版 || SHA1:待更新 繁体中文版 || SHA1:待更新 英文版 || SHA1: ...

  5. visual studio 使用正则查找或替换示例

    visual studio 使用正则查找或替换示例 注意哟:使用之前应做好备份 visual studio 2015: 多行替换 (.*)point\ =(.*);\r\n.+this.([A-Za- ...

  6. visual studio 2012 链接Mysql 5.1

    首先在nuGet 下载MySql.Data.Entity 安装 mysql for visual studio http://www.mysql.com/why-mysql/windows/visua ...

  7. 使用Visual Studio Team Services敏捷规划和项目组合管理(一)——使用团队、区域和迭代

    使用Visual Studio Team Services敏捷规划和项目组合管理(一)--使用团队.区域和迭代 概述 在本实验,你将会了解Visual Studio Team Services提供的敏 ...

  8. Visual Studio Team Services 动手实验

    Visual Studio Team Services 动手实验 概述 为Visual Studio Team Services提供的动手实验,要完成实验首先需要满足以下条件: Visual Stud ...

  9. R8:Learning paths for Data Science[continuous updating…]

    Comprehensive learning path – Data Science in Python Journey from a Python noob to a Kaggler on Pyth ...

随机推荐

  1. linux内存源码分析 - 内存压缩(实现流程)

    本文为原创,转载请注明:http://www.cnblogs.com/tolimit/ 概述 本文章最好结合linux内存管理源码分析 - 页框分配器与linux内存源码分析 -伙伴系统(初始化和申请 ...

  2. Gym101138D Strange Queries/BZOJ5016 SNOI2017 一个简单的询问 莫队、前缀和、容斥

    传送门--Gym 传送门--BZOJ THUWC2019D1T1撞题可还行 以前有些人做过还问过我,但是我没有珍惜,直到进入考场才追悔莫及-- 设\(que_{i,j}\)表示询问\((1,i,1,j ...

  3. 狄利克雷卷积&莫比乌斯反演总结

    狄利克雷卷积&莫比乌斯反演总结 Prepare 1.\([P]\)表示当\(P\)为真时\([P]\)为\(1\),否则为\(0\). 2.\(a|b\)指\(b\)被\(a\)整除. 3.一 ...

  4. javaweb 项目启动问题:Application Server was not connected before run configuration stop, reason: javax.manage

    参考:https://blog.csdn.net/whm18322394724/article/details/80290187 换成本机的jre就行了(路径要正确,特别是项目迁移的时候有时候用环境变 ...

  5. C#.NET 大型通用信息化系统集成快速开发平台 4.6 版本 - SSO单点登录接口

    当开发的系统多了.用户多了.合作伙伴多了.对接厂商多了.开发人员多了.部署的服务器也多了,各种安全问题就暴露出来了. 如何安全的把这些系统集成在一起?实现集群的单点登录.严格统一的用户安全体系管理? ...

  6. SQL Server 跨服务器查询

    select * from OPENDATASOURCE( 'SQLOLEDB', 'Data Source=10.10.10.10;User ID=sa;Password=123456'). [CF ...

  7. C++常用代码优化策略

    C++代码常用的优化策略 1.不存在指向空值的引用,意味着引用比指针的效率更高,因为在使用引用之前不需要测试它的合法性:指针可以被重新赋值以指向另一个不同的对象,但是引用总是指向它初始化时指定的对象. ...

  8. JS 作用域及作用域链

    一.作用域 在 Javascript 中,作用域分为 全局作用域 和 函数作用域 全局作用域: 代码在程序的任何地方都能被访问,window 对象的内置属性都拥有全局作用域. 函数作用域: 在固定的代 ...

  9. python os模块详解

    一.Python os模块(Linux环境) 1.1 执行shell命令 os.system('cmd') 执行命令不保存结果 os.popen('command') 执行后返回结果,使用.read( ...

  10. HDU 2001 计算两点间的距离

    http://acm.hdu.edu.cn/showproblem.php?pid=2001 Problem Description 输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离 ...