R: Exchange X and Y Coordinates

flipxy {spatstat} | R Documentation

## Exchange X and Y Coordinates

### Description

Exchanges the x and y coordinates in a spatial dataset.

### Usage

     flipxy(X)
     ## S3 method for class 'owin'
    flipxy(X)
     ## S3 method for class 'ppp'
    flipxy(X)
     ## S3 method for class 'psp'
    flipxy(X)
     ## S3 method for class 'im'
    flipxy(X)

### Arguments

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

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

### Value

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

### Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

and Rolf Turner r.turner@auckland.ac.nz

### See Also

`affine`, `reflect`, `rotate`, `shift`

### Examples

      data(cells)
      X <- flipxy(cells)

[Package spatstat version 1.63-3 Index]