## Use the Meuse River dataset from the package 'gstat'
library(sp)
library(gstat)
data(meuse.all)
coordinates(meuse.all) <- ~ x + y
X <- scale(coordinates(meuse.all))
D <- as.matrix(dist(X))
K <- tps.rbf(D, TRUE)
Run the code above in your browser using DataLab