marks: marks method for Dtable and wmppp objects

marksR Documentation

marks method for Dtable and wmppp objects

Description

S3 methods for the marks generic.

Usage

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

Arguments

x

A Dtable or wmppp.object object.

...

Extra arguments, currently unused.

value

The value to set.

dfok

Ignored.

drop

Ignored.

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.

Value

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

Author(s)

Eric Marcon <Eric.Marcon@agroparistech.fr>

Examples

# 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)

dbmss documentation built on June 8, 2025, 1:59 p.m.