Learn R Programming

dbmss (version 2.11-0)

marks: marks method for Dtable and wmppp objects

Description

S3 methods for the marks generic.

Usage

# S3 method for Dtable
marks(x, ...)
  # S3 method for Dtable
marks(x, ...) <- value
  # S3 method for wmppp
marks(x, ..., dfok = TRUE, drop = TRUE) <- value

Value

A dataframe with columns "PointType" and "PointWeight".

Arguments

x

A Dtable or wmppp.object object.

...

Extra arguments, currently unused.

value

The value to set.

dfok

Ignored.

drop

Ignored.

Author

Eric Marcon <Eric.Marcon@agroparistech.fr>

Details

These functions extract or modify the marks of a Dtable.

`marks<-.wmppp()` just calls `marks<-.ppp()` and keeps the class of the wmppp object. The conformity of the marks with the definition of the class "wmppp", i.e. a dataframe with columns "PointType" and "PointWeight" of the same length as the number of points, is not checked.

Examples

Run this code
# A Dtable containing two points
Dmatrix <- matrix(c(0,1,1,0), nrow=2)
PointType <- c("Type1", "Type2")
PointWeight <- c(2,3)
X <- Dtable(Dmatrix, PointType, PointWeight)
# Extract the marks
marks(X)

Run the code above in your browser using DataLab