wmppp.object {dbmss}R Documentation

Class of Weighted, Marked, Planar Point Patterns


A class "wmppp" to represent a two-dimensional point pattern of class ppp whose marks are a dataframe with two columns:


This class represents a two-dimensional point pattern dataset. wmppp objects are also of class ppp.

Objects of class wmppp may be created by the function wmppp and converted from other types of data by the function as.wmppp.

See Also

ppp.object, wmppp, as.wmppp autoplot.wmppp


# Draw the coordinates of 10 points
X <- runif(10)
Y <- runif(10)
# Draw the point types and weights
PointType   <- sample(c("A", "B"), 10, replace=TRUE)
PointWeight <- runif(10)
# Build the point pattern
X <- wmppp(data.frame(X, Y, PointType, PointWeight), owin())

# Plot the point pattern. which.marks=1 for point weights, 2 for point types
plot(X, which.marks=1, main="Point weights")
plot(X, which.marks=2, main="Point types")

# Or use autoplot for a ggplot

[Package dbmss version 2.7-8 Index]