I´m trying to create a range map in R, which is supposed to show the occurences of a specific tree species (Quercus cerris) in the world. For this I use the database BIEN and the function BIEN_ranges_species from their R-package. I manage to create the map of the world, but the marks which show the occurence of the trees can not be seen. There might be a problem with the layer which shows the occurence marks.
I used exacetly the same type of code, which BIEN recommends in their example and which I show in the following:
species_vector <- c("Quercus_cerris")
BIEN_ranges_species(species_vector)
BIEN_ranges_species(species_vector, match_names_only = TRUE)
temp_dir <- file.path("C:/Users/Nele/Documents/R_Karten")
BIEN_ranges_species(species = species_vector,
directory = temp_dir)
BIEN_ranges_species("Quercus_cerris")
BIEN_ranges_species("Quercus_cerris",
directory = temp_dir)
Quercus_test <- st_read(dsn = temp_dir,
layer = "Quercus_cerris")
plot(Quercus_test[1])
map('world', fill = TRUE, col = "grey")
plot(Quercus_test[1],
col = "red",
add = TRUE)
In addition, when I only plot the data for Quercus cerris, using this part of the code:
plot(Quercus_test[1],
col = "red",
add = TRUE)
there are also no marks visible.
Can anyone please help me or explain what I can do differently to receive a map, which shows where this tree species exists and where it doesn´t?