lagalize: Create lagged RasterStacks

Description Usage Arguments Value Examples

View source: R/lagalize.R

Description

The function is used to produce lagged RasterStacks. The second is cut from the beginning, the first from the tail to ensure equal output lengths (provided that input lengths were equal).

Usage

1
lagalize(data.pred, data.resp, lag = NULL, freq = 12, ...)

Arguments

data.pred

a RasterStack (to be cut from tail)

data.resp

a RasterStack (to be cut from beginning)

lag

the desired lag (in the native frequency of the stacks)

freq

the frequency of the RasterStacks

...

currently not used

Value

a list with the two RasterStacks lagged by lag

Examples

1
2
3
4
5
6
7
data(pacificSST)
data(australiaGPCP)

# lag GPCP by 4 months
lagged <- lagalize(pacificSST, australiaGPCP, lag = 4, freq = 12)
lagged[[1]][[1]] #check names to see date of layer
lagged[[2]][[1]] #check names to see date of layer

environmentalinformatics-marburg/Reot documentation built on May 13, 2017, 6:09 p.m.