Learn R Programming

spatstat (version 1.48-0)

flipxy: Exchange X and Y Coordinates

Description

Exchanges the $x$ and $y$ coordinates in a spatial dataset.

Usage

flipxy(X) "flipxy"(X) "flipxy"(X) "flipxy"(X) "flipxy"(X)

Arguments

X
Spatial dataset. An object of class "owin", "ppp", "psp" or "im".

Value

Another object of the same type, representing the result of swapping the $x$ and $y$ coordinates.

Details

This function swaps the $x$ and $y$ coordinates of a spatial dataset. This could also be performed using the command affine, but flipxy is faster. The function flipxy is generic, with methods for the classes of objects listed above.

See Also

affine, reflect, rotate, shift

Examples

Run this code
  data(cells)
  X <- flipxy(cells)

Run the code above in your browser using DataLab