## ----setup--------------------------------------------------------------------
library(potentiomap)
data("synthetic_anisotropic_points")
p <- ps_make_points(synthetic_anisotropic_points, "x", "y", "head",
                    "point_id", "EPSG:26916")

## ----variogram----------------------------------------------------------------
v <- suppressWarnings(ps_variogram(p, directions = c(0, 45, 90, 135)))
head(v$empirical[, c("np", "dist", "gamma", "dir.hor")])
models <- suppressWarnings(ps_variogram_compare(v, c("Sph", "Exp")))
models$ranking[, c("model", "weighted_sse", "singular")]
a <- suppressWarnings(ps_anisotropy(p, minimum_pairs = 5))
a$summary

