Learn R Programming

spatstat.geom (version 3.2-8)

relevel.im: Reorder Levels of a Factor-Valued Image or Pattern

Description

For a pixel image with factor values, or a point pattern with factor-valued marks, the levels of the factor are re-ordered so that the level ref is first and the others are moved down.

Usage

# S3 method for im
relevel(x, ref, ...)

# S3 method for ppp relevel(x, ref, ...)

# S3 method for ppx relevel(x, ref, ...)

Value

Object of the same kind as x.

Arguments

x

A pixel image (object of class "im") with factor values, or a point pattern (object of class "ppp", "ppx", "lpp" or "pp3") with factor-valued marks.

ref

The reference level.

...

Ignored.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

Rolf Turner rolfturner@posteo.net

and Ege Rubak rubak@math.aau.dk

Details

These functions are methods for the generic relevel.

If x is a pixel image (object of class "im") with factor values, or a point pattern (object of class "ppp", "ppx", "lpp" or "pp3") with factor-valued marks, the levels of the factor are changed so that the level specified by ref comes first.

See Also

mergeLevels

Examples

Run this code
  amacrine
  relevel(amacrine, "on")

Run the code above in your browser using DataLab