relevel.im

0th

Percentile

Reorder Levels of a Factor-Valued Image or Pattern

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.

Keywords
manip, spatial
Usage
## S3 method for class 'im':
relevel(x, ref, \dots)

## S3 method for class 'ppp': relevel(x, ref, \dots)

## S3 method for class 'ppx': relevel(x, ref, \dots)

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.
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.

Value

  • Object of the same kind as x.

See Also

mergeLevels

Aliases
  • relevel.im
  • relevel.ppp
  • relevel.ppx
Examples
amacrine
  relevel(amacrine, "on")
Documentation reproduced from package spatstat, version 1.42-2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.