I have a possibly related error message when running the plotting function:
Error: longitude of center must be between -180 and 180 degrees. note ggmap uses lon/lat, not lat/lon.
In addition: Warning message:
In min(Result$Results$Quantiles$Medianlon[twilights.index][Result$Results$Quantiles$Medianlon[twilights.index] > :
no non-missing arguments to min; returning Inf
Interestingly this only happens when using certain grid boundaries for the spatial extent.
So far I could trigger the error as soon as I extended the right boundary above lon -160 e.g.,
Grid<-make.grid(left=160, bottom=-80, right=-140, top=-10,
will trigger it while
Grid<-make.grid(left=160, bottom=-80, right=-160, top=-10,
does not produce an error.
UPDATE: It actually seems only to occur when a position with longitude >-160 (e.g., -140) is plotted!
My feel is that this is also a ggmap related issue.
I don't think it is related as it is a sp error, but I get an error message when running plot_util_distr:
+ dates=data.frame(as.POSIXct('2016-03-03'), as.POSIXct('2016-08-07')),
+ add.scale.bar=TRUE, percentiles=0.5)
function will plot 308 twilights
Error in sp::CRS(aeqd) : major axis or radius = 0 or not given
I am very thankful about your comments on this.
All the best and keep up the great work Eldar!,