powered by
The function cuts a specified number of layers off a RrasterStack in order to create lagged RasterStacks.
cutStack(x, tail = TRUE, n = NULL)
a RasterStack shortened by n layers either from the beginning or the end, depending on the specification of tail
n
tail
a RasterStack
logical. If TRUE the layers will be taken off the end of the stack. If FALSE layers will be taken off the beginning.
TRUE
FALSE
the number of layers to take away.
data(australiaGPCP) # 6 layers from the beginning cutStack(australiaGPCP, tail = FALSE, n = 6) # 8 layers from the end cutStack(australiaGPCP, tail = TRUE, n = 8)
Run the code above in your browser using DataLab