Raster image seems to be shifted using leaflet for R
I want to plot some spatial data using the leaflet package in R, however the generated raster image seems to be shifted compared to a reference grid. I suspect map projection issue, but I am not expert on the topic, so any help would be appreciated. Here is a minimal code to plot the map: library(leaflet) library(sp) library(raster) set.seed(111) # create dummy data -rectangular grid with random values m = 10 n = 10 x = seq(45,48,length.out = m) y = seq(15,18,length.out = n) X = matrix(rep(x, each = n), nrow = n) Y = matrix(rep(y, m), nrow = n) # collector dataframe points = data.frame(value =