<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/difficult-to-reproduce-choroplethr-bug-can-you-help/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://arilamstein.com/blog/2018/02/20/difficult-reproduce-choroplethr-bug-can-help/"> R – AriLamstein.com</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Since November 2017 I have received three bug reports from users who see this error when running any command in the choroplethr package:</p>
<pre>Theme element panel.border missing
  Error in if (theme$panel.ontop) { : argument is of length zero
</pre>
<p>Normally when someone reports a choroplethr bug that I cannot reproduce I recommend they do the following:</p>
<ol>
<li>Update to the latest version of R and RStudio.</li>
<li>Type “update.packages(ask=FALSE)” to get the latest version of each package.</li>
<li>Restart R and try again.</li>
</ol>
<p>However, each of the three users has tried this it has not solved their problem.</p>
<p>It appears that the bug is at least somewhat OS dependent. I am running the following version of R:</p>
<pre>R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.3</pre>
<p>and I cannot reproduce the bug. The users who report the bug have these configurations:</p>
<pre>version R version 3.4.3 (2017-11-30)
 system x86_64, linux-gnu    

version R version 3.4.3 (2017-11-30)
 system x86_64, linux-gnu

R version 3.4.1 (2017-06-30)
 Platform: x86_64-w64-mingw32/x64 (64-bit)
 Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack 1</pre>
<p>Because I do not have access to a machine configuration that produces the bug, I am limited in my ability to debug this.</p>
<p>A google search for this error shows that issues <a rel="nofollow" href="https://arilamstein.com/?feed-stats-url=aHR0cHM6Ly9naXRodWIuY29tL2RrYWhsZS9nZ21hcC9pc3N1ZXMvMTc5&feed-stats-url-post-id=6996" target="_blank">#179</a> (a linux machine) and <a rel="nofollow" href="https://arilamstein.com/?feed-stats-url=aHR0cHM6Ly9naXRodWIuY29tL2RrYWhsZS9nZ21hcC9pc3N1ZXMvMTg1&feed-stats-url-post-id=6996" target="_blank">#185</a> (no OS specified) in the ggmap package both report the same error and were filed at roughly the same time that I started receiving these error reports. These issues seem to have been resolved by <a rel="nofollow" href="https://arilamstein.com/?feed-stats-url=aHR0cHM6Ly9naXRodWIuY29tL2RrYWhsZS9nZ21hcC9wdWxsLzE4Ng%3D%3D&feed-stats-url-post-id=6996" target="_blank">this</a> change. However, since I am not able to reproduce the error on my own machine, I am reluctant to make any updates to the choroplethr code base based on what I see in that commit.</p>
<p>If you are able to shed some light on what is going on with this bug, then please leave a comment below.</p>
<p>The following code seems to reproduce the bug:</p>
<pre>library(choroplethr)
library(choroplethrMaps)
data(df_pop_state)
state_choropleth(df_pop_state)</pre>
<p> <img width="1" src="https://arilamstein.com/?feed-stats-post-id=6996" height="1"></p>
<p>The post <a rel="nofollow" href="https://arilamstein.com/blog/2018/02/20/difficult-reproduce-choroplethr-bug-can-help/" target="_blank">Difficult to Reproduce Choroplethr Bug: Can You Help?</a> appeared first on <a rel="nofollow" href="https://arilamstein.com/" target="_blank">AriLamstein.com</a>.</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://arilamstein.com/blog/2018/02/20/difficult-reproduce-choroplethr-bug-can-help/"> R – AriLamstein.com</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/9DIef3Dsn3E" height="1"></a></div>