sampling_random_spatstat: Creates coordinates (lower left corner of a quadrat) randomly...

View source: R/Sample_quadrats.R

sampling_random_spatstatR Documentation

Creates coordinates (lower left corner of a quadrat) randomly distributed but without overlapping each other

Description

Efficient algorithm from package spatstat.random is used. Produces similar results as sampling_random_bruteforce.

Usage

sampling_random_spatstat(
  n_quadrats,
  min_dist,
  xmin,
  xmax,
  ymin,
  ymax,
  seed = NULL
)

Arguments

n_quadrats

Number of sampling quadrats

min_dist

(numeric) minimal distance between two points to avoid overlap. Equal to the length of a quadrat diagonal

xmin

(numeric) minimum possible value on the x axis a quadrat can cover.

xmax

(numeric) maximum possible value on the x axis a quadrat can cover.

ymin

(numeric) minimum possible value on the y axis a quadrat can cover.

ymax

(numeric) maximum possible value on the y axis a quadrat can cover.

seed

(integer) Any integer passed to set.seed for reproducibility.

Value

a data.frame with 2 columns x and y giving the coordinates of the lower left corner of the square quadrats.


FelixMay/MoBspatial documentation built on April 1, 2024, 2:18 a.m.