Description Usage Arguments Details Value Examples
View source: R/Landscape_Methods.R
This function creates an object SpatialPolygonsDataFrame and simulates a landscape with neutral and source fields.
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
)
|
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) |
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.
An SpatialPolygonsDataFrame object with n
fields, prop
pourcentage of toxic
fields of size (xmin,xmax) (ymin,ymax)
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.