Generates a new variable data with Gaussian simulations with Spherical model where we can control some parameters of this variables (mean, deviation and spatial autocorrelation). Can be used, for instance, to create a variable simulating and spatially aggregated patter as vegetation patches.

generateVar(nrow, ncol, Vmean, Vsd, Vrange)

Arguments

nrow

Row number of the grid to be created.

ncol

Column number of the grid to be created.

Vmean

Mean value of the variabl to be created.

Vsd

Standard deviation for variable distribution.

Vrange

Range distance for the autocorrelation model.

Details

Value

Returns a data frame with generated grid coordinates and values generated.

References

Author

Note

See also

Examples

set.seed(1234)

# With default parameters
var <- generateVar(101, 101, 1, 0.1, 15)
#> [using unconditional Gaussian simulation]
rst <- rast(var, type="xyz")

plot(rst)