Skip to contents

Accessing original forecast and observation data for triptych objects

Usage

forecasts(x, ...)

observations(x, ...)

Arguments

x

An object from which the relevant information should be extracted.

...

Additional arguments passed to other methods.

Value

For forecasts(): A tibble of the original forecasts in long format.

For observations(): A vector of the observations.

Examples

data(ex_binary, package = "triptych")
tr <- triptych(ex_binary)

forecasts(tr)
#> # A tibble: 10,000 × 2
#>    forecast        x
#>    <chr>       <dbl>
#>  1 X01      0.000385
#>  2 X01      0.569   
#>  3 X01      0.243   
#>  4 X01      0.177   
#>  5 X01      0.000628
#>  6 X01      0.00578 
#>  7 X01      0.548   
#>  8 X01      0.102   
#>  9 X01      0.374   
#> 10 X01      0.998   
#> # ℹ 9,990 more rows
observations(tr) 
#>    [1] 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 0
#>   [38] 0 0 1 0 0 0 1 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 1 1
#>   [75] 0 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1
#>  [112] 1 1 1 1 0 1 0 0 1 1 1 0 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1
#>  [149] 0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 1 1 0 1 1 0 0 1 0 0 0 1 0
#>  [186] 0 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 0
#>  [223] 0 0 1 0 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 1 1 1 1 0 1 1 1 1 0 0 0 0 1 1 0
#>  [260] 1 0 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 0 1 1 0 1 1 1 1 1 0 0 1 0 0 1 0 0 0
#>  [297] 0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