Subsetting reliability diagram objects

# S3 method for reliabilitydiag
[(x, i)

Arguments

x

an object inheriting from the class 'reliabilitydiag'.

i

index specifying which elements to extract.

Value

an object inheriting from the class 'reliabilitydiag'.

See also

Examples

data("precip_Niamey_2016", package = "reliabilitydiag")

r <- reliabilitydiag(
  precip_Niamey_2016[c("Logistic", "EMOS")],
  y = precip_Niamey_2016$obs
)
length(r)
#> [1] 2
r[1]

#> 'brier' score decomposition (see also ?summary.reliabilitydiag)
#> # A tibble: 1 × 5
#>   forecast mean_score miscalibration discrimination uncertainty
#>   <chr>         <dbl>          <dbl>          <dbl>       <dbl>
#> 1 Logistic      0.206         0.0171         0.0555       0.244
r["EMOS"]

#> 'brier' score decomposition (see also ?summary.reliabilitydiag)
#> # A tibble: 1 × 5
#>   forecast mean_score miscalibration discrimination uncertainty
#>   <chr>         <dbl>          <dbl>          <dbl>       <dbl>
#> 1 EMOS          0.232         0.0183         0.0305       0.244