Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Error with map_ggplot #32

Closed
maelle opened this issue Jan 14, 2019 · 5 comments
Closed

Error with map_ggplot #32

maelle opened this issue Jan 14, 2019 · 5 comments
Labels
Milestone

Comments

@maelle
Copy link
Contributor

maelle commented Jan 14, 2019

library("dismo")
#> Loading required package: raster
#> Loading required package: sp
g <- gbif('Batrachoseps', 'luciae', geo = TRUE, end = 300)
#> Loading required namespace: jsonlite
#> 1954 records found
#> 0-300 records downloaded
mapr::map_ggplot(g, "lon", "lat")
#> Error: The parameter 'point_color' has been replaced by 'color'

Created on 2019-01-14 by the reprex package (v0.2.1)

Session info
devtools::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.4.4 (2018-03-15)
#>  os       Ubuntu 18.04.1 LTS          
#>  system   x86_64, linux-gnu           
#>  ui       X11                         
#>  language en_US                       
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       Europe/Paris                
#>  date     2019-01-14                  
#> 
#> ─ Packages ──────────────────────────────────────────────────────────────
#>  package     * version    date       lib source                         
#>  assertthat    0.2.0      2017-04-11 [1] CRAN (R 3.4.4)                 
#>  backports     1.1.3      2018-12-14 [1] CRAN (R 3.4.4)                 
#>  bindr         0.1.1      2018-03-13 [1] CRAN (R 3.4.4)                 
#>  bindrcpp      0.2.2      2018-03-29 [1] CRAN (R 3.4.4)                 
#>  callr         3.1.1      2018-12-21 [1] CRAN (R 3.4.4)                 
#>  cli           1.0.1      2018-09-25 [1] CRAN (R 3.4.4)                 
#>  codetools     0.2-15     2016-10-05 [4] CRAN (R 3.4.2)                 
#>  colorspace    1.4-0      2019-01-08 [1] R-Forge (R 3.4.4)              
#>  crayon        1.3.4      2017-09-16 [1] CRAN (R 3.4.4)                 
#>  crosstalk     1.0.0      2016-12-21 [1] CRAN (R 3.4.4)                 
#>  desc          1.2.0      2018-05-01 [1] CRAN (R 3.4.4)                 
#>  devtools      2.0.1      2018-10-26 [1] CRAN (R 3.4.4)                 
#>  digest        0.6.18     2018-10-10 [1] CRAN (R 3.4.4)                 
#>  dismo       * 1.1-4      2017-01-09 [1] CRAN (R 3.4.4)                 
#>  dotCall64     1.0-0      2018-07-30 [1] CRAN (R 3.4.4)                 
#>  dplyr         0.7.8      2018-11-10 [1] CRAN (R 3.4.4)                 
#>  evaluate      0.12       2018-10-09 [1] CRAN (R 3.4.4)                 
#>  fields        9.6        2018-01-29 [1] CRAN (R 3.4.4)                 
#>  foreign       0.8-69     2017-06-21 [4] CRAN (R 3.4.2)                 
#>  fs            1.2.6      2018-08-23 [1] CRAN (R 3.4.4)                 
#>  ggplot2       3.1.0      2018-10-25 [1] CRAN (R 3.4.4)                 
#>  glue          1.3.0.9000 2019-01-06 [1] Github (tidyverse/glue@3f7012c)
#>  gtable        0.2.0      2016-02-26 [1] CRAN (R 3.4.4)                 
#>  highr         0.7        2018-06-09 [1] CRAN (R 3.4.4)                 
#>  htmltools     0.3.6      2017-04-28 [1] CRAN (R 3.4.4)                 
#>  htmlwidgets   1.3        2018-09-30 [1] CRAN (R 3.4.4)                 
#>  httpuv        1.4.5.1    2018-12-18 [1] CRAN (R 3.4.4)                 
#>  jsonlite      1.6        2018-12-07 [1] CRAN (R 3.4.4)                 
#>  knitr         1.21       2018-12-10 [1] CRAN (R 3.4.4)                 
#>  later         0.7.5      2018-09-18 [1] CRAN (R 3.4.4)                 
#>  lattice       0.20-35    2017-03-25 [4] CRAN (R 3.4.2)                 
#>  lazyeval      0.2.1      2017-10-29 [1] CRAN (R 3.4.4)                 
#>  leaflet       2.0.2      2018-08-27 [1] CRAN (R 3.4.4)                 
#>  magrittr      1.5        2014-11-22 [1] CRAN (R 3.4.4)                 
#>  mapr          0.4.0.9100 2019-01-14 [1] local                          
#>  maps          3.3.0      2018-04-03 [1] CRAN (R 3.4.4)                 
#>  maptools      0.9-4      2018-09-19 [1] CRAN (R 3.4.4)                 
#>  memoise       1.1.0      2017-04-21 [1] CRAN (R 3.4.4)                 
#>  mime          0.6        2018-10-05 [1] CRAN (R 3.4.4)                 
#>  munsell       0.5.0      2018-06-12 [1] CRAN (R 3.4.4)                 
#>  pillar        1.3.1      2018-12-15 [1] CRAN (R 3.4.4)                 
#>  pkgbuild      1.0.2      2018-10-16 [1] CRAN (R 3.4.4)                 
#>  pkgconfig     2.0.2      2018-08-16 [1] CRAN (R 3.4.4)                 
#>  pkgload       1.0.2      2018-10-29 [1] CRAN (R 3.4.4)                 
#>  plyr          1.8.4      2016-06-08 [1] CRAN (R 3.4.4)                 
#>  prettyunits   1.0.2      2015-07-13 [1] CRAN (R 3.4.4)                 
#>  processx      3.2.1      2018-12-05 [1] CRAN (R 3.4.4)                 
#>  promises      1.0.1      2018-04-13 [1] CRAN (R 3.4.4)                 
#>  ps            1.3.0      2018-12-21 [1] CRAN (R 3.4.4)                 
#>  purrr         0.2.5      2018-05-29 [1] CRAN (R 3.4.4)                 
#>  R6            2.3.0      2018-10-04 [1] CRAN (R 3.4.4)                 
#>  raster      * 2.8-4      2018-11-03 [1] CRAN (R 3.4.4)                 
#>  Rcpp          1.0.0      2018-11-07 [1] CRAN (R 3.4.4)                 
#>  remotes       2.0.2      2018-10-30 [1] CRAN (R 3.4.4)                 
#>  rlang         0.3.1      2019-01-08 [1] CRAN (R 3.4.4)                 
#>  rmarkdown     1.11       2018-12-08 [1] CRAN (R 3.4.4)                 
#>  rprojroot     1.3-2      2018-01-03 [1] CRAN (R 3.4.4)                 
#>  rworldmap     1.3-6      2016-02-03 [1] CRAN (R 3.4.4)                 
#>  scales        1.0.0      2018-08-09 [1] CRAN (R 3.4.4)                 
#>  sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 3.4.4)                 
#>  shiny         1.2.0      2018-11-02 [1] CRAN (R 3.4.4)                 
#>  sp          * 1.3-1      2018-06-05 [1] CRAN (R 3.4.4)                 
#>  spam          2.2-1      2018-12-20 [1] CRAN (R 3.4.4)                 
#>  stringi       1.2.4      2018-07-20 [1] CRAN (R 3.4.4)                 
#>  stringr       1.3.1      2018-05-10 [1] CRAN (R 3.4.4)                 
#>  testthat      2.0.1      2018-10-13 [1] CRAN (R 3.4.4)                 
#>  tibble        2.0.0      2019-01-04 [1] CRAN (R 3.4.4)                 
#>  tidyselect    0.2.5      2018-10-11 [1] CRAN (R 3.4.4)                 
#>  usethis       1.4.0.9000 2019-01-03 [1] Github (r-lib/usethis@85bf30a) 
#>  withr         2.1.2      2018-03-15 [1] CRAN (R 3.4.4)                 
#>  xfun          0.4        2018-10-23 [1] CRAN (R 3.4.4)                 
#>  xtable        1.8-3      2018-08-29 [1] CRAN (R 3.4.4)                 
#>  yaml          2.2.0      2018-07-25 [1] CRAN (R 3.4.4)                 
#> 
#> [1] /home/maelle/R/x86_64-pc-linux-gnu-library/3.4
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library
@sckott sckott added the bug label Jan 14, 2019
@sckott
Copy link
Contributor

sckott commented Jan 14, 2019

thank! there is a problem but also you used positional args, but lon and lat are not the 2nd and 3rd params

@sckott sckott closed this as completed in 9b4cdb5 Jan 14, 2019
@sckott
Copy link
Contributor

sckott commented Jan 14, 2019

dismo is a bit of an edge case. made pkg to make going from spocc and rgbif to a map easier, so didn't focus on dismo, plus dismo just gives back a data.frame so it's hard to build anything around that that's automated with little user input. I added a name parameter so good idea for data.frame's to give the column that has a the taxon name.

also, lon and lat aren't the 2nd and 3rd parameters, so just need to give those param names

library("dismo")
library("mapr")
g <- gbif('Batrachoseps', 'luciae', geo = TRUE, end = 300)
map_ggplot(g, lon = "lon", lat = "lat", name = "genus", map = "usa")

@maelle
Copy link
Contributor Author

maelle commented Jan 14, 2019

I used dismo to use an example from the README in the reprex but had gotten the problem with an rgbif output 🙂

@sckott
Copy link
Contributor

sckott commented Jan 14, 2019

thanks, just noticed that your code was from readme, woopsy, fixing that.

@sckott sckott added this to the v0.5 milestone Jan 14, 2019
@maelle
Copy link
Contributor Author

maelle commented Jan 14, 2019

I found the other bug because I then decided to run all the code from the README since I was at it 😉

sckott added a commit that referenced this issue Jan 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants