nlm_randomcluster: nlm_randomcluster

Description Usage Arguments Details Value References Examples

View source: R/nlm_randomcluster.R

Description

Simulates a random cluster nearest-neighbour neutral landscape.

Usage

1
2
3
4
5
6
7
8
9
nlm_randomcluster(
  ncol,
  nrow,
  resolution = 1,
  p,
  ai = c(0.5, 0.5),
  neighbourhood = 4,
  rescale = TRUE
)

Arguments

ncol

[integer(1)]
Number of columns forming the raster.

nrow

[integer(1)]
Number of rows forming the raster.

resolution

[numerical(1)]
Resolution of the raster.

p

[numerical(1)]
Defines the proportion of elements randomly selected to form clusters.

ai

Vector with the cluster type distribution (percentages of occupancy). This directly controls the number of types via the given length.

neighbourhood

[numerical(1)]
Clusters are defined using a set of neighbourhood structures, 4 (Rook's or von Neumann neighbourhood) (default), 8 (Queen's or Moore neighbourhood).

rescale

[logical(1)]
If TRUE (default), the values are rescaled between 0-1.

Details

This is a direct implementation of steps A - D of the modified random clusters algorithm by Saura & Martínez-Millán (2000), which creates naturalistic patchy patterns.

Value

Raster with random values ranging from 0-1.

References

Saura, S. & Martínez-Millán, J. (2000) Landscape patterns simulation with a modified random clusters method. Landscape Ecology, 15, 661 – 678.

Examples

1
2
3
4
5
6
7
8
9
# simulate random clustering
random_cluster <- nlm_randomcluster(ncol = 30, nrow = 30,
                                     p = 0.4,
                                     ai = c(0.25, 0.25, 0.5))
## Not run: 
# visualize the NLM
landscapetools::show_landscape(random_cluster)

## End(Not run)

NLMR documentation built on Sept. 20, 2021, 9:07 a.m.