variogram_range: Automatic calculation of a variogram range

View source: R/functions_spatial.R

variogram_rangeR Documentation

Automatic calculation of a variogram range

Description

Automatic calculation of a variogram range

Usage

variogram_range(
  x,
  project_to_utm = TRUE,
  sub_samplepoints_N = NULL,
  crs = NULL,
  seed = NULL
)

Arguments

x

A two-dimensional raster::RasterLayer, terra::SpatRaster, stars object, or an object that can be passed to as_points.

project_to_utm

A logical value. If TRUE, then x will be projected to a suitable UTM; otherwise, x will be projected to WGS84.

sub_samplepoints_N

An integer value. If not NULL, then a random sample of x will be taken of the specified size.

crs

An object which is a crs or from which one can be derived. x can be numeric as a EPSG number; a character string as a wkt; a character string as a proj4 (not recommended because outdated); or of a class including raster::Raster, sp::Spatial, sp::CRS, or a sf or sfc class.

seed

Passed to set.seed; used only if sub_samplepoints_N is a number.

Value

A numeric value representing the variogram range in units of x.

See Also

autofitVariogram

Examples

xy <- as_points(0.5 + cbind(0:9, 0:9), crs = 6350, to_class = "sf")
variogram_range(xy)


DrylandEcology/rSW2st documentation built on Jan. 10, 2024, 6:22 p.m.