nlm_random: nlm_random

Description Usage Arguments Details Value Examples

View source: R/nlm_random.R

Description

Simulates a spatially random neutral landscape model with values drawn a uniform distribution.

Usage

1
nlm_random(ncol, nrow, resolution = 1, rescale = TRUE)

Arguments

ncol

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

nrow

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

resolution

[numerical(1)]
Resolution of the raster.

rescale

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

Details

The function takes the number of columns and rows as input and creates a RasterLayer with the same extent. Each raster cell is randomly assigned a value between 0 and 1 drawn from an uniform distribution (runif(1,0,1)).

Value

RasterLayer

Examples

1
2
3
4
5
6
7
8
# simulate spatially random model
random <- nlm_random(ncol = 200, nrow = 100)

## Not run: 
# visualize the NLM
landscapetools::show_landscape(random)

## End(Not run)

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