Jump to content
Ornithology Exchange
  • 0
Louise de Raad

Error with map.FlightR.ggmap function

Question

I have recently been getting an error when trying to map the FlightR results. I have re-installed and loaded the latest versions of packages: ggmap, ggplot2, RgoogMaps, maptools and grid (just in case this had anything to do with it). I even installed the latest version of ggmap from GitHub > install_github("dkahle/ggmap") as I read in some forum that the error would be resolved with version 2.7 .. but not so).

 

> map.FLightR.ggmap(Result)

Error in mapproj::mapproject(x, y, projection = coord$projection, parameters = coord$params, :
object 'C_setproj' not found

 

Any thoughts much appreciated. Louise

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Ok - so a colleague of mine found the answer. The error I was getting was:

 

> map.FLightR.ggmap(Result)

Error in mapproj::mapproject(x, y, projection = coord$projection, parameters = coord$params, :
object 'C_setproj' not found

 

Meaning the error was in the package called "mapproj" in the function mapproject. He looked up the mapproj package on github (https://github.com/cran/mapproj/blob/master/R/mapproj.r) and we removed the package from my library and re-installed it.

 

>remove.packages("mapproj")

>install.packages("mapproj")

 

And this solved the problem. Still not sure why the function didn't work, but if anybody gets the same error message, that may just be the solution!

 

Cheers,

Louise

Share this post


Link to post
Share on other sites
  • 0

   Hi Louse, 

 I cannot reproduce the issue could you please type

 sessionInfo()
and send results to me. You can also send your result object and I will try it.
  Cheers,
    Eldar

Share this post


Link to post
Share on other sites
  • 0

Hi Eldar,

 

This is the result from sessionInfo() – thanks for that, I didn’t know how to do that! How do I “package” my result object to send to you? Thanks for your help, Louise (PS I can’t make new TAGS files at the moment – see other query on the forum about the LightImage function– or I would try on a few other bird - running the script from scratch, this particular bird has only one calibration period, but the same happened with my other result files)

 

> sessionInfo()

R version 3.4.2 (2017-09-28)

Platform: x86_64-w64-mingw32/x64 (64-bit)

Running under: Windows >= 8 x64 (build 9200)

 

Matrix products: default

 

locale:

[1] LC_COLLATE=English_United Kingdom.1252

[2] LC_CTYPE=English_United Kingdom.1252  

[3] LC_MONETARY=English_United Kingdom.1252

[4] LC_NUMERIC=C                          

[5] LC_TIME=English_United Kingdom.1252   

 

attached base packages:

[1] grid      stats     graphics  grDevices utils     datasets  methods 

[8] base    

 

other attached packages:

[1] ggmap_2.7      ggplot2_2.2.1  maptools_0.9-2 sp_1.2-5     

 [5] MASS_7.3-47    SGAT_0.1.3     TwGeos_0.0-1   GeoLight_2.0.0

[9] maps_3.2.0     FLightR_0.4.6  BAStag_0.1.3 

 

loaded via a namespace (and not attached):

[1] Rcpp_0.12.13      bindr_0.1         compiler_3.4.2    plyr_1.8.4      

 [5] bitops_1.0-6      tools_3.4.2       digest_0.6.12     dotCall64_0.9-04

 [9] tibble_1.3.4      gtable_0.2.0      lattice_0.20-35   pkgconfig_2.0.1 

[13] png_0.1-7         rlang_0.1.2       mapproj_1.2-5     spam_2.1-1      

[17] proto_1.0.0       bindrcpp_0.2      coda_0.19-1       dplyr_0.7.4     

[21] stringr_1.2.0     raster_2.5-8      RgoogleMaps_1.4.1 fields_9.0      

[25] glue_1.1.1        R6_2.2.2          jpeg_0.1-8        foreign_0.8-69  

[29] reshape2_1.4.2    magrittr_1.5      scales_0.5.0      assertthat_0.2.0

[33] changepoint_2.2.2 colorspace_1.3-2  geosphere_1.5-5   labeling_0.3    

[37] stringi_1.1.5     lazyeval_0.2.0    munsell_0.4.3     rjson_0.2.15    

[41] zoo_1.8-0 

Share this post


Link to post
Share on other sites
  • 0

   All looks good to me and still cannot reproduce the error. Try 

save(Result, file='Result.RData')

 

and send it to me via e.g. wetransfer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×