<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/five-great-charts-in-5-lines-of-r-code-each/"></div></div><div><a data-url="https://www.r-bloggers.com/five-great-charts-in-5-lines-of-r-code-each/" data-counturl="https://www.r-bloggers.com/five-great-charts-in-5-lines-of-r-code-each/" data-count="horizontal" data-text="Five great charts in 5 lines of R code each" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2016/08/five-great-charts-in-5-lines-of-r-code-each.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>Sharon Machlis is a journalist with Computerworld, and to show other journalists how great R is for data visualization she shows them <a target="_blank" href="http://www.computerworld.com/article/2893271/business-intelligence/5-data-visualizations-in-5-minutes-each-in-5-lines-or-less-of-r.html">these five data visualizations</a>, each of which can be created in 5 lines of R code or less.</p>
<p><iframe height="281" width="500" allowfullscreen src="https://www.youtube.com/embed/D3KkbqWGiR0?rel=0"></iframe> </p>
<p>I’ve reproduced Sharon’s code and charts below. I did make a couple of tweaks to the code, though. I added a call to <span><a target="_blank" href="http://www.rdocumentation.org/packages/checkpoint/versions/0.3.16/topics/checkpoint">checkpoint</a>(“2016-08-22”)</span> which, if you’ve saved the code to a file, will install all the necessary packages for you. (I also verified that the code runs with package versions as of today’s date, and if you’re trying out this code at a later time it will continue to do so, <a target="_blank" href="https://mran.microsoft.com/documents/rro/reproducibility/#timemachine">thanks to checkpoint</a>.) I also modified the data download code to make it work more easily on Windows. Here are the charts and code:</p>
<p><a target="_blank" href="http://www.computerworld.com/article/2893271/business-intelligence/5-data-visualizations-in-5-minutes-each-in-5-lines-or-less-of-r.html"><img title="Starbucks" alt="Starbucks" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01bb092e1c85970d-800wi" border="0"></a></p>
<p></p>
<p><a target="_blank" href="http://www.computerworld.com/article/2893271/business-intelligence/5-data-visualizations-in-5-minutes-each-in-5-lines-or-less-of-r.html"><img title="Stocks" alt="Stocks" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c88ac152970b-800wi" border="0"></a></p>
<p></p>
<p><a target="_blank" href="http://www.computerworld.com/article/2893271/business-intelligence/5-data-visualizations-in-5-minutes-each-in-5-lines-or-less-of-r.html"><img title="Atlanta" alt="Atlanta" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b8d214716e970c-800wi" border="0"></a></p>
<p></p>
<p><a target="_blank" href="http://www.computerworld.com/article/2893271/business-intelligence/5-data-visualizations-in-5-minutes-each-in-5-lines-or-less-of-r.html"><img title="Scatter" alt="Scatter" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01bb092e1d5b970d-800wi" border="0"></a></p>
<p></p>
<p><a target="_blank" href="http://www.computerworld.com/article/2893271/business-intelligence/5-data-visualizations-in-5-minutes-each-in-5-lines-or-less-of-r.html"><img title="Corrmap" alt="Corrmap" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b8d214721c970c-800wi" border="0"></a></p>
<p>For more on the charts, read Sharon’s Computerworld article by following the link below.</p>
<p>Computerworld: <a target="_blank" href="http://www.computerworld.com/article/2893271/business-intelligence/5-data-visualizations-in-5-minutes-each-in-5-lines-or-less-of-r.html">5 data visualizations in 5 minutes: each in 5 lines or less of R</a></p>
<p> </p>
</div>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="https://www.r-bloggers.com/five-great-charts-in-5-lines-of-r-code-each/"></div></div><div><a data-url="https://www.r-bloggers.com/five-great-charts-in-5-lines-of-r-code-each/" data-counturl="https://www.r-bloggers.com/five-great-charts-in-5-lines-of-r-code-each/" data-count="vertical" data-text="Five great charts in 5 lines of R code each" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://blog.revolutionanalytics.com/2016/08/five-great-charts-in-5-lines-of-r-code-each.html"> Revolutions</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/wAmlE5hqLtY"></a></div>