trmm2spi: Compute spi

Description Usage Arguments Value Author(s) Examples

View source: R/trmm2spi.R

Description

Compute spi from a rasterStack/Brick of monthly rainfall data

Usage

1
2
3
trmm2spi(x, scale, kernel = list(type = "rectangular", shift = 0),
  distribution = "Gamma", fit = "ub-pwm", na.rm = FALSE,
  ref.start = NULL, ref.end = NULL, keep = FALSE, params = NULL, ...)

Arguments

x

filename, rasterStack, rasterBrick, with time written on the z dimension

scale

See spi

kernel

See spi

distribution

See spi

na.rm

See spi

ref.start

See spi

ref.end

See spi

keep

See spi (called x in the original spi function)

param

See spi

...

Arguments to be passed to writeRaster

Value

RasterStack with time written to the z dimention

Author(s)

Loic Dutrieux

Examples

1
2
3
4
5
6
data(dailyTRMM)
monthly <- timeAggregateMonth(daily)
spiSpatial <- trmm2spi(monthly, scale=6)

# Plot pixel number 2 of that brick
plot(zoo(as.vector(spiSpatial[2]), getZ(spiSpatial)))

loicdtx/trmm documentation built on May 21, 2019, 7:38 a.m.