wmppp {dbmss}R Documentation

Create a Weighted, Marked, Planar Point Pattern


Creates an object of class "wmppp" representing a two-dimensional point pattern with weights and labels.


wmppp(df, window = NULL, unitname = NULL)



A dataframe with at least two columns containing point coordinates.


An object of calls "owin" (owin.object).


Name of unit of length. Either a single character string, or a vector of two character strings giving the singular and plural forms, respectively. Ignored if window is not NULL.


Columns named "X", "Y", "PointType", "PointWeight" (capitalization is ignored) are searched to build the "wmppp" object and set the point coordinates, type and weight. If they are not found, columns are used in this order. If columns are missing, PointType is set to "All" and PointWeight to 1. If a "PointName" column is found, it is used to set the row names of the marks, else the original row names are used.

If the window is not specified, a rectangle containing all points is used, and unitname is used.


An object of class "wmppp".

See Also



# Draw the coordinates of 10 points
X <- runif(10)
Y <- runif(10)
# Draw the point types.
PointType   <- sample(c("A", "B"), 10, replace=TRUE)
# Plot the point pattern. Weights are set to 1 ant the window is adjusted.
plot(wmppp(data.frame(X, Y, PointType)), , which.marks=2)

[Package dbmss version 2.7-8 Index]