aggregate_days4spi: Accumulations to be used by the daily_spi and daily_spei...

View source: R/SPI_SPEI_at_specific_day_utils.R

aggregate_days4spiR Documentation

Accumulations to be used by the daily_spi and daily_spei functions,

Description

Accumulations to be used by the daily_spi and daily_spei functions,

Usage

aggregate_days4spi(Prod_data, scale, trgt = NULL, temporal_scale = "daily")

Arguments

Prod_data

'SpatRaster' object that contains spatially-distributed monthly precipitation data that will be used to calculate the SPI. This 'SpatRaster' must include the time that corresponds to the dates of the respective layers. They can be set with the function time of the terra package.

scale

Integer value that represents the time scale at which the SPI will be computed.

trgt

The day for which the function will be computed. The default is NULL, indicating that the last day of the data will be selected.

Value

This function returns a 'SpatRaster' of the specific date (e.g., " accumulation period (e.g., scale = 3, accumulates the specific date plus the previous 89 days).


obaezvil/SpatIndex documentation built on Aug. 9, 2024, 3:42 p.m.