Hendrik Posted March 13, 2017 Share Posted March 13, 2017 Dear Eldar, I am sorry for the double post, but I think this got lost in the end of a previous post that was already answered. I receive two error messages when using the functions map.FLightR.ggmap and plot_util_distr: 1. map.FLightR.ggmap map.FLightR.ggmap(Result)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 either using certain grid boundaries for the spatial extent or if the bird under investigation uses certain areas, I am not quite sure what the pattern is. 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, distance.from.land.allowed.to.use=c(-Inf, Inf), distance.from.land.allowed.to.stay=c(-Inf, Inf)) will trigger it while Grid<-make.grid(left=160, bottom=-80, right=-160, top=-10, distance.from.land.allowed.to.use=c(-Inf, Inf), distance.from.land.allowed.to.stay=c(-Inf, Inf)) does not produce an error. UPDATE: It actually seems to occur when a position with longitude >-160 (e.g., -140) is plotted! However, it also occurs sometimes if e.g., longitude >-140 is used. My feel is that this is also a ggmap related issue and may once again have to do with the dateline. 2. running plot_util_distr error I don't think it is related as it is a sp error, but I get an error message when running plot_util_distr: plot_util_distr(Result,+ dates=data.frame(as.POSIXct('2016-03-03'), as.POSIXct('2016-08-07')),+ add.scale.bar=TRUE, percentiles=0.5)function will plot 308 twilightsError 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!, Hendrik Link to comment Share on other sites More sharing options...
Eldar Posted March 14, 2017 Share Posted March 14, 2017 Hi Hendrik, Looks like dateline issue. Could you send me your results file (via email) and I will have a look. Eldar Link to comment Share on other sites More sharing options...
Eldar Posted March 17, 2017 Share Posted March 17, 2017 Issue solved with FLightR>=0.4.7 Link to comment Share on other sites More sharing options...
Hendrik Posted March 20, 2017 Author Share Posted March 20, 2017 Thanks Eldar, map.FLightR.ggmap works fine for me now. The plot_util_distr only caused me trouble on my macOS machine, turned out it works fine on windows. Thank you very much for your help Eldar, very much appreciated! Hendrik Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.