| rUnround | R Documentation |
Given a point pattern in which the spatial coordinates have been discretised (rounded), randomly displace each point to reverse the effect of rounding.
rUnround(X, ...)
## S3 method for class 'ppp'
rUnround(X, ..., xstep=NULL, ystep=xstep,
nsim = 1, drop=TRUE, giveup = 1000)
X |
Point pattern (object of class |
... |
Arguments passed to |
xstep, ystep |
Numeric values giving the resolution of the discretised coordinates. |
giveup |
Maximum number of attempts to place a point inside the window. |
nsim |
Number of simulated realisations of the unrounded pattern. |
drop |
Logical value specifying, when |
This function is similar to rjitter except that it is
designed to reverse the effect of discretisation of coordinates.
The spatial coordinates of X are modified by
adding independent, uniformly distributed random numbers
to the x and y coordinates. If the points of X
were all located at the centres of pixels in a pixel grid, then the points of
rUnround(X) will be uniformly randomly distributed
within the same pixels.
Another point pattern (object of class "ppp")
in the same window as X and with
the same number of points as X.
.
rjitter, discretise
X <- runifrect(30, Frame(letterR))[letterR]
Y <- discretise(X, eps=0.05)
Z <- rUnround(Y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.