Difficult to Reproduce Choroplethr Bug: Can You Help?

February 20, 2018
By

(This article was first published on R – AriLamstein.com, and kindly contributed to R-bloggers)

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:

  1. Update to the latest version of R and RStudio.
  2. Type “update.packages(ask=FALSE)” to get the latest version of each package.
  3. 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.

To leave a comment for the author, please follow the link and comment on their blog: R – AriLamstein.com.

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...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)