Since November 2017 I have received three bug reports from users who see this error when running any command in the choroplethr package:
Theme element panel.border missing Error in if (theme$panel.ontop) { : argument is of length zero
Normally when someone reports a choroplethr bug that I cannot reproduce I recommend they do the following:
- Update to the latest version of R and RStudio.
- Type “update.packages(ask=FALSE)” to get the latest version of each package.
- Restart R and try again.
However, each of the three users has tried this it has not solved their problem.
It appears that the bug is at least somewhat OS dependent. I am running the following version of R:
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
and I cannot reproduce the bug. The users who report the bug have these configurations:
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
Because I do not have access to a machine configuration that produces the bug, I am limited in my ability to debug this.
A google search for this error shows that issues #179 (a linux machine) and #185 (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 this 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.
If you are able to shed some light on what is going on with this bug, then please leave a comment below.
The following code seems to reproduce the bug:
library(choroplethr) library(choroplethrMaps) data(df_pop_state) state_choropleth(df_pop_state)
The post Difficult to Reproduce Choroplethr Bug: Can You Help? appeared first on AriLamstein.com.
var vglnk = { key: '949efb41171ac6ec1bf7f206d57e90b8' }; (function(d, t) { var s = d.createElement(t); s.type = 'text/javascript'; s.async = true; s.src = '//cdn.viglink.com/api/vglnk.js'; var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r); }(document, 'script'));R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...