when I plot a map using ggspatial and ggOceanMaps, I always get the message when I restart the code (i.e. with reset of the environment):
Cannot find files:
C:\Users\AppData\Local\Temp\Rtmpo1nDLv\arctic_land.rda,
C:\Users\AppData\Local\Temp\Rtmpo1nDLv\arctic_glacier.rda,
C:\Users\AppData\Local\Temp\Rtmpo1nDLv\dd_rbathy_cont.rda.
Do you want download them now?
1: Yes
2: No
selection: 1
And I have to download everything again (I don't know if I fill the memory of my computer piece by piece). Can I avoid this or will the old data be deleted when I download it?
My code:
library(ggOceanMaps)
library(readxl)
library(ggspatial)
library(dplyr)
data_a <- structure(list(Nr = c(1, 2, 3, 4, 5, 6), Name = c("MD95-2006",
"IODP 302", "IODP 302", "IODP 302", "IODP 302", "IODP 302"),
Lat = c(57.083333, 87.89, 87.9036, 87.92118, 87.93333, 87.86658
), Long = c(-8.05, 137.65, 138.46065, 139.365501, 139.535,
136.17735), `18O` = c(0.69, NA, NA, NA, NA, NA), Info = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_), Source = c("MD95-2006 planktic foraminifera ?13C and ?18O",
"https://www.ecord.org/expedition302/", "https://www.ecord.org/expedition302/",
"https://www.ecord.org/expedition302/", "https://www.ecord.org/expedition302/",
"https://www.ecord.org/expedition302/")), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
data_b <- structure(list(Nr = c(1, 2, 3, 4, 5, 6), Name = c("Simstich",
"Schiebel", "Schiebel", "Stangeew", "Stangeew", "Stangeew"),
Lat = c(75.003333, 62.50275, 67.225033, 56.2747, 53.4347,
52.874), Long = c(-7.313333, -13.99235, 2.920317, -48.6992,
-50.0673, -51.5128), `18O` = c(NA, NA, NA, NA, NA, NA), Info = c("data for different depths",
NA, NA, NA, NA, NA), Source = c("https://doi.pangaea.de/10.1594/PANGAEA.82001?format=html#download",
"https://doi.pangaea.de/10.1594/PANGAEA.75647?format=html#download",
"https://doi.pangaea.de/10.1594/PANGAEA.75719", "https://doi.pangaea.de/10.1594/PANGAEA.706908",
"https://doi.pangaea.de/10.1594/PANGAEA.706908", "https://doi.pangaea.de/10.1594/PANGAEA.706908"
)), row.names = c(NA, -6L), class = c("tbl_df", "tbl", "data.frame"
))
data <- bind_rows(list(data_a,data_b), .id="data_source")
map <- basemap(limits = c(-125, -110, 25, 35), glaciers = TRUE,shapefiles = "Arctic", bathy.style = "rcb") +
ggspatial::geom_spatial_point(
data = data, aes(x = Long, y = Lat, color = data_source)
) +
scale_color_manual(
values = c("red", "yellow")
) +
guides(color = guide_legend(override.aes = list(fill = NA)))
print(map)