Learn R Programming

spatstat (version 1.64-1)

marks.tess: Marks of a Tessellation

Description

Extract or change the marks attached to the tiles of a tessellation.

Usage

# S3 method for tess
marks(x, …)           

# S3 method for tess marks(x, …) <- value

# S3 method for tess unmark(X)

# S3 method for lintess marks(x, …)

# S3 method for lintess marks(x, …) <- value

# S3 method for lintess unmark(X)

Arguments

x,X

Tessellation (object of class "tess") or tessellation on a linear network (object of class "lintess").

Ignored.

value

Vector or data frame of mark values, or NULL.

Value

For marks(x), the result is a vector, factor or data frame, containing the mark values attached to the tiles of x. If there are no marks, the result is NULL.

For unmark(x), the result is the tessellation without marks.

For marks(x) <- value, the result is the updated tessellation x (with the side-effect that the dataset x is updated in the current environment).

Details

These functions extract or change the marks attached to each of the tiles in the tessellation x. They are methods for the generic functions marks and marks<- for the class "tess" of tessellations and the class "lintess" of tessellations on a network.

The expression marks(x) extracts the marks of x. The assignment marks(x) <- value assigns new marks to the dataset x, and updates the dataset x in the current environment.

The marks can be a vector, a factor, or a data frame.

For the assignment marks(x) <- value, the value should be a vector or factor of length equal to the number of tiles in x, or a data frame with as many rows as there are tiles in x. If value is a single value, or a data frame with one row, then it will be replicated so that the same marks will be attached to each tile.

To remove marks, use marks(x) <- NULL or unmark(x).

See Also

marks, marks<-

Examples

Run this code
# NOT RUN {
  D <- dirichlet(cells)
  marks(D) <- tile.areas(D)

  B <- lineardirichlet(runiflpp(5, simplenet))
  marks(B) <- letters[1:5]
# }

Run the code above in your browser using DataLab