R: Transpose

transpose {terra} | R Documentation

## Transpose

### Description

Transpose a SpatRaster

### Usage

    ## S4 method for signature 'SpatRaster'
    t(x)

    ## S4 method for signature 'SpatVector'
    t(x)

    ## S4 method for signature 'SpatRaster'
    trans(x, filename="", ...)

### Arguments

`x` | SpatRaster
`filename` | character. Output filename
`...` | additional arguments for writing files as in `writeRaster`

### Value

SpatRaster

### See Also

`flip, rotate`

### Examples

    r <- rast(nrows=18, ncols=36)
    values(r) <- 1:ncell(r)
    tr1 <- t(r)
    tr2 <- trans(r)
    ttr <- trans(tr2)

[Package terra version 1.4-22 Index]