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. .net core实践系列之SSO-同域实现

    前言 SSO的系列还是以.Net Core作为实践例子与大家分享,SSO在Web方面复杂度分同域与跨域.本篇先分享同域的设计与实现,跨域将在下篇与大家分享. 如有需要调试demo的,可把SSO项目部署 ...

  2. web安全:通俗易懂,以实例讲述破解网站的原理及如何进行防护!如何让网站变得更安全。

    本篇以我自己的网站为例来通俗易懂的讲述网站的常见漏洞,如何防止网站被入侵,如何让网站更安全. 要想足够安全,首先得知道其中的道理. 本文例子通俗易懂,主要讲述了 各种漏洞 的原理及防护,相比网上其它的 ...

  3. Python-正则复习-56

    # 正则表达式# 字符组 [字符]# 元字符 # \w \d \s # \W \D \S # . 除了换行符以外的任意字符 # \n \t # \b # ^ $ 匹配字符串的开始和结束 # () 分组 ...

  4. CF每日一练 Codeforces Round #520 (Div. 2)

    比赛过程总结:过程中有事就玩手机了,后面打的状态不是很好,A题理解错题意,表明了内心不在状态,B题想法和思路都是完全正确的,但是并没有写出来,因为自己代码能力不强,思路不是特别清晰,把代码后面写乱了, ...

  5. PHP api接口和SQL数据库关联

    数据库表创建 服务器环境配置.连接 .操作.数据库 API接口  原则:

  6. Divide by three, multiply by two CodeForces - 977D (思维排序)

    Polycarp likes to play with numbers. He takes some integer number xx, writes it down on the board, a ...

  7. C#使用OneNote的图片文字识别功能(OCR)

    http://www.cnblogs.com/Charltsing/p/OneNoteOCR.html 有需要技术咨询的,联系QQ564955427 前段时间有人问我能不能通过OneNote扫描图片, ...

  8. Mysql的使用,常用的SQL语句

    一.启动mysql服务 启动mysql服务: systemctl start mysqld.service root用户登录mysql: 修改root 密码: alter user 'root'@'l ...

  9. Redis客户端断开重连功能要点

    Redis客户端: Java基于Jedis开发 C#基于StackExchange开发 C++基于acl开发 首先确保在主从模式下,客户端能分辨主从节点,自动连接正确的客户端,这样只要有一个节点可用, ...

  10. Error: [WinError 10013] 以一种访问权限不允许的方式做了一个访问套接字的尝试

    近来发现两个问题: 1.jenkins设置邮箱时邮件发送测试不成功,之前是成功的: 2.启动python服务时,使用8000端口报错,但是用其他端口可用: 百度了一下,原来是端口占用的问题,可用如下方 ...