Jump to content


Photo

Error with map.FlightR.ggmap function

FLightR ggmap projection geolocator

Best Answer Louise de Raad , 06 November 2017 - 09:38 AM

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/c...ter/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

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 Louise de Raad

Louise de Raad
  • General Members
  • 13 posts
  • Inverness,
  • United Kingdom

Posted 16 October 2017 - 04:57 AM

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



#2 Eldar

Eldar
  • General Members
  • 47 posts
  • Netherlands,
  • Netherlands

Posted 16 October 2017 - 05:42 AM

   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


#3 Louise de Raad

Louise de Raad
  • General Members
  • 13 posts
  • Inverness,
  • United Kingdom

Posted 16 October 2017 - 06:30 AM

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 



#4 Eldar

Eldar
  • General Members
  • 47 posts
  • Netherlands,
  • Netherlands

Posted 17 October 2017 - 02:07 AM

   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



#5 Louise de Raad

Louise de Raad
  • General Members
  • 13 posts
  • Inverness,
  • United Kingdom

Posted 25 October 2017 - 01:30 AM

Hi Eldar, I saved all the output files, script and workspace to Dropbox and shared the folder with you. I hope you received the link. Thanks, Louise



#6 Louise de Raad

Louise de Raad
  • General Members
  • 13 posts
  • Inverness,
  • United Kingdom

Posted 06 November 2017 - 09:38 AM   Best Answer

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/c...ter/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







Also tagged with one or more of these keywords: FLightR, ggmap, projection, geolocator

0 user(s) are reading this topic

0 members(s), 0 guests(s) and 0 anonymous member(s)