qmplot, geom_segment error in visual-traceroute.R, plot_ggmap() function
Closed this issue · 0 comments
_BUG_: If you see these errors, run the script a second time from R.
- Error: geom_segment requires the following missing aesthetics: x, y
- Error in eval(expr, envir, enclos) : object 'next_longitude' not found
> source("./visual-traceroute.R")
Tracing route to: www.gov.za ...
Using zoom = 3...
Error in eval(expr, envir, enclos) : object 'next_longitude' not found
> source("./visual-traceroute.R")
Tracing route to: www.gov.za ...
Using zoom = 3...
Saving 6.99 x 7 in image
Note: Until this bug is fixed, map.pkg='ggmap'
will not work from running the script from the OS command-line shell (e.g., Bash, DOS) using Rscript
.
To see this error, you will need to set map.pkg='ggmap'
in the script options and either set use.cache=TRUE
or remove (if exists) the cached ggmap.png
for the host you are mapping before running to the script to force the recreation of the map. Example: images/www_gov_za/ggmap.png
.
If you use save.plot=FALSE
, you can see that this failure pattern will hold repeatedly ... every other sourcing of the document from the R console gives the error, alternating with no-error, back and forth.
Note, this script starts with rm(list=ls())
so I don't see why the error only shows up on every other sourcing of the script.