<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/xkcd-curve-fitting-in-r/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2018/09/curve-fitting.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>You probably saw this <a rel="nofollow" href="https://xkcd.com/2048/" target="_blank">XKCD</a> last week, which brought a grimace of recognition to statisticians everywhere:</p>
<p><a rel="nofollow" href="https://xkcd.com/2048/" target="_blank"><img border="0" alt="Curve_fitting" title="Curve_fitting" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b022ad394df60200d-800wi"></a></p>
<p>It's so realistic, that Barry Rowlingson was able to reproduce all but two of the &quot;charts&quot; above with a simple R function (and a little help from the xkcd ggplot2 theme):</p>
<blockquote class="twitter-tweet" data-lang="en">
<p dir="ltr" lang="en">And now for <a rel="nofollow" href="https://twitter.com/revodavid?ref_src=twsrc%5Etfw" target="_blank">@revodavid</a> et al, with the xkcd package and font! (still two more to do…) <a rel="nofollow" href="https://t.co/3aVHis23Gl" target="_blank">pic.twitter.com/3aVHis23Gl</a></p>
<p>— Barry Rowlingson (@geospacedman) <a rel="nofollow" href="https://twitter.com/geospacedman/status/1043246011873984513?ref_src=twsrc%5Etfw" target="_blank">September 21, 2018</a></p></blockquote>
<p></p>
<p>You can find the <a rel="nofollow" href="https://gitlab.com/b-rowlingson/xkcd2048" target="_blank">R code behind Barry's reproductions here</a>, and I'm sure he'd welcome contributions for the remaining two charts :). </p>
<p> </p>
</div>
	<p>
<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/2018/09/curve-fitting.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 rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/kmuOjsa-gSI" height="1"></a></div>