cutStack: Shorten a RasterStack

Description Usage Arguments Value Examples

Description

The function cuts a specified number of layers off a RrasterStack in order to create lagged RasterStacks.

Usage

1

Arguments

data

a RasterStack

tail

logical. If TRUE the layers will be taken away from the end of the stack. If FALSE layers will be taken away from the beginning.

lag

the number of layers to take away.

Value

a RasterStack shortened by lag either from the beginning or the end, depending on the specification of tail

Examples

1
2
3
4
5
6
data(australiaGPCP)

# 6 layers from the beginning
cutStack(australiaGPCP, tail = FALSE, lag = 6)
# 8 layers from the end
cutStack(australiaGPCP, tail = TRUE, lag = 8)

environmentalinformatics-marburg/Reot documentation built on May 16, 2019, 7:50 a.m.