compute_indexes {tidyindex}R Documentation

Calculate multiple indexes at once

Description

Calculate multiple indexes at once

Usage

compute_indexes(.data, ...)

## S3 method for class 'idx_res'
augment(x, .id = ".id", ...)

Arguments

.data

an idx_tbl object

...

Unused, included for generic consistency only

x

an idx_res object, calculated from compute_indexes

.id

a character string, the name of the first column

Value

an idx_res object

Examples

library(dplyr)
library(lmomco)
library(generics)
res <- tenterfield |>
  mutate(month = lubridate::month(ym)) |>
  init(id = id, time = ym, group = month) |>
  compute_indexes(
    spi = idx_spi(),
    spei = idx_spei(.lat = lat, .tavg = tavg),
    edi = idx_edi()
 )

[Package tidyindex version 0.1.0 Index]