Closed Miguelbirostris closed 1 year ago
The function has been revised in the 2.0 version of ggOceanMaps which will appear on CRAN once I have fixed all the issues:
library(ggOceanMaps);library(ggplot2)
#> Loading required package: ggplot2
#> ggOceanMaps: Setting data download folder to a temporary folder
#> /var/folders/9v/b70pd53x04d3jjmlrbcgp4_w0000gv/T//Rtmp9K3mh9. This
#> means that any downloaded map data need to be downloaded again when you
#> restart R. To avoid this problem, change the default path to a
#> permanent folder on your computer. Add following lines to your
#> .Rprofile file: {.ggOceanMapsenv <- new.env(); .ggOceanMapsenv$datapath
#> <- 'YourCustomPath'}. You can use usethis::edit_r_profile() to edit the
#> file.'~/Documents/ggOceanMapsLargeData'would make it in a writable
#> folder on most operating systems.
packageVersion("ggOceanMaps")
#> [1] '2.0.0'
dt <- data.frame(lon = seq(-20, 80, length.out = 41), lat = 50:90)
dt <- dist2land(dt)
#> Used lon and lat as input coordinate column names in data
#> Using DecimalDegree as land shapes.
#> Calculating distances...
#> Returning great circle spherical distances from land as kilometers.
qmap(dt, color = ldist) + scale_color_viridis_c()
Created on 2023-06-30 with reprex v2.0.2
You can try the new version here: https://github.com/MikkoVihtakari/ggOceanMaps/tree/sf-version
Please reopen if the issue remains in the new version.