Learn R Programming

dbmss (version 2.0.3)

as.wmppp: Converts data to class wmppp

Description

Creates a Weighted, Marked, Planar Point Pattern, i.e. an object of class "wmppp" representing a two-dimensional point pattern with weights and labels. This is a generic method.

Usage

as.wmppp(X, ...)
  ## S3 method for class 'ppp':
as.wmppp(X, \dots)
  ## S3 method for class 'data.frame':
as.wmppp(X, window = NULL, unitname = NULL, \dots)

Arguments

X
Data to be converted into a weighted, marked, planar point pattern (wmppp.object)
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.
...
Extra arguments.

Value

  • An object of class "wmppp".

Details

This is a generic method, implemented for ppp and data.frame:
  • If the datasetXis an object of class "ppp" (ppp.object), the marks are converted to point weights if they are numeric or to point types if they are factors. Default weights are set to 1, default types to "All". If marks are a dataframe with column names equal toPointTypeandPointWeight, they are not modified.
If the dataset X is a dataframe, see wmppp.

See Also

wmppp.object