#NOTE: This example only shows how to implement gwpcor using sample data (meuse) in sp package.
#Results do not suggest any meanings.
#import data from sp package
library(sp)
library(sf)
data(meuse, package = "sp")
meuse_sf <- st_as_sf(meuse, coords = c("x", "y"), crs = 28992)
#implement gwpcor as an example
#the bandwidth is arbitrary.
res <- gwpcor(sdata = meuse_sf, vars = c("cadmium","copper", "zinc"),
method = "pearson", kernel = "bisquare",adaptive = TRUE,
bw = 0.25, geodisic_measure = "cheap", foreach = FALSE)
Run the code above in your browser using DataLab