View source: R/rRandomLabeling.R
rRandomLabeling | R Documentation |
Simulates of a point pattern according to the null hypothesis of random labeling.
rRandomLabeling(X, CheckArguments = TRUE)
X |
A weighted, marked, planar point pattern ( |
CheckArguments |
Logical; if |
Marks are redistributed randomly across the original point pattern.
A new weighted, marked, planar point pattern (an object of class wmppp
, see wmppp.object
).
Goreaud, F. et Pelissier, R. (2003). Avoiding misinterpretation of biotic interactions with the intertype K12 fonction: population independence vs random labelling hypotheses. Journal of Vegetation Science 14(5): 681-692.
rRandomLabelingM
, rPopulationIndependenceK
# Simulate a point pattern with five types
X <- rpoispp(50)
PointType <- sample(c("A", "B", "C", "D", "E"), X$n, replace=TRUE)
PointWeight <- runif(X$n, min=1, max=10)
X$marks <- data.frame(PointType, PointWeight)
X <- as.wmppp(X)
autoplot(X, main="Original pattern")
# Randomize it
Y <- rRandomLabeling(X)
# Types and weights have been redistributed randomly across locations
autoplot(Y, main="Randomized pattern")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.