| rdiffuse | R Documentation |
Given a spatial point pattern inside a window, allow each point of the pattern to undergo random spatial diffusion inside the window for a specified amount of time, and return the final position of each point.
rdiffuse(X, sigma, ...)
## S3 method for class 'ppp'
rdiffuse(X, sigma, ..., nsim=1, drop=TRUE,
connect = 8, method = c("C", "interpreted"), unround = TRUE)
X |
Point pattern (object of class |
sigma |
Equivalent standard deviation of the final position of each point, if the window were unbounded. A single positive number, or a pixel image. |
... |
Arguments passed to |
nsim |
Number of simulated realisations to be generated. |
drop |
Logical. If |
connect |
Pixel grid connectivity (4 or 8). |
method |
For testing purposes only. Character string (partially matched) specifying whether to use a C language implementation or an interpreted R implementation. |
unround |
Logical value specifying whether the final positions
of the points should be altered slightly
by adding a small random error to the coordinates
using |
The spatial locations of the points of X are first discretised
onto a pixel grid, with resolution specified by the arguments
....
Each point then executes a random walk on the pixel grid,
independently of other points. The final location of each point
is returned.
A point pattern or a list of point patterns.
Each point pattern has the same window as X and the same number of
points as X.
.
densityHeat.ppp
plot(solist(original=cells, diffused=rdiffuse(cells, 0.05)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.