simulateInitialPartition: simulateInitialPartition Method

Description Usage Arguments Details Value Examples

View source: R/Landscape_Methods.R

Description

This function creates an object SpatialPolygonsDataFrame and simulates a landscape with neutral and source fields.

Usage

1
2
3
4
5
6
7
8
9
simulateInitialPartition(
  n = 500,
  prop = 0.4,
  range = 10,
  xmin = 0,
  xmax = 5000,
  ymin = 0,
  ymax = 5000
)

Arguments

n

Numeric, numbers of cells

prop

Numeric [0,1] toxic cells proportion

range

Aggregation parameter (range of the spatial Exponential covariance of Gaussian process)

xmin

x-axis left coordinates in space unit (see projections_briskaR)

xmax

x-axis right coordinates in space unit (see projections_briskaR)

ymin

y-axis bottom coordinates in space unit (see projections_briskaR)

ymax

y-axis top coordinates in space unit (see projections_briskaR)

Details

In the function the first step is a binomial point process to simulate a SpatialPointsDataFrame with sources and neutral marks, which depends on the aggregation parameter. The second step of the function is the Voronoi tesselation from the simulated points and returns a SpatialPolygonsDataFrame.

Value

An SpatialPolygonsDataFrame object with n fields, prop pourcentage of toxic fields of size (xmin,xmax) (ymin,ymax)

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Simulate a 5000m x 5000m landscape with 500 cells (e.g. fields)
# whose 40% (200 cells) are sources.
# The projection by default is Lambert93 projection.
land <- simulateInitialPartition(n=500,prop=0.4,range=10,xmin=0,xmax=5000,ymin=0,ymax=5000)
plot(land)

## End(Not run)

briskaR documentation built on Dec. 11, 2021, 9:23 a.m.