Random Spatialized Distribution of a Species

rSpSpecies(
  n,
  Spatial = "Binomial",
  scale = 0.2,
  mu = 10,
  win = spatstat.geom::owin(),
  Species = NULL,
  Sizes = "Uniform",
  MinSize = 1,
  MaxSize = 1,
  MeanSize = 20,
  Wscale = 20,
  shape = 2,
  CheckArguments = TRUE
)

Arguments

n

The number of individuals to draw.

Spatial

The spatial distribution of points. May be "Binomial" (a completely random point pattern except for its fixed number of points) or "Thomas" for a clustered point pattern with parameters scale and mu.

scale

In Thomas point patterns, the standard deviation of random displacement (along each coordinate axis) of a point from its cluster center.

mu

In Thomas point patterns, the mean number of points per cluster. The intensity of the Poisson process of cluster centers is calculated as the number of points (size) per area divided by mu.

win

The window containing the point pattern. It is an owin object.

Species

A vector of characters or of factors containing the possible species.

Sizes

The distribution of point sizes. May be "Uniform" for a uniform distribution between MinSize and MaxSize. By default, all sizes are 1. May be "Weibull" with parameters MinSize, Wscale and shape.

MinSize

The minimum size in a uniform or Weibull distribution.

MaxSize

The maximum size in a uniform distribution.

MeanSize

The mean size in an exponential distribution (i.e. the negative of the inverse of the rate).

Wscale

The scale parameter in a Weibull distribution.

shape

The shape parameter in a Weibull distribution.

CheckArguments

If TRUE (default), the function arguments are verified. Should be set to FALSE to save time in simulations for example, when the arguments have been checked elsewhere.

Value

A wmppp.object.

Examples

spSpecies <- rSpSpecies(50, Spatial = "Thomas")
autoplot(spSpecies)