wmppp function

Create a Weighted, Marked, Planar Point Pattern

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)

Arguments

  • df: A dataframe with at least two columns containing point coordinates.
  • window: An object of calls "owin" (owin.object).
  • unitname: 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.

Details

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.

Returns

An object of class "wmppp".

See Also

wmppp.object,

Examples

# 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)
  • Maintainer: Eric Marcon
  • License: GNU General Public License
  • Last published: 2024-08-24