Description Usage Arguments Value
Currently add DMI, and SPEI and SPI for different scales. PET for SPEI is computed according to Hargreaves.
1 2 3 4 5 6 7 8 9 10 11 | add_indices(
x,
scales = c(1, 2, 3, 6, 12),
id = "id",
lat = "lat",
tmean = "tmean",
tmin = "tmin",
tmax = "tmax",
prec = "prec",
drop_lat = TRUE
)
|
x |
a data.frame with climate data, that has at least id for location id, lat for latitude, year, month, tmean, tmin, and tmax for mean, minimum, and maximum temperature, and prec for precipitation. |
scales |
for which temporal scales should spei and spi be computed |
id |
character string for location id variable |
lat |
character string for lat variable |
tmean |
character string for tmean variable |
tmin |
character string for tmin variable |
tmax |
character string for tmax variable |
prec |
character string for prec variable |
drop_lat |
should latitude be dropped from result? |
a data.frame consisting of the original climate data with additional variables for drought indices
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.