Skip to contents

Create a list of harp data frames

Usage

as_harp_list(...)

is_harp_list(x)

Arguments

...

harp_df data frames. Must be named

x

An object to test.

Value

a harp_list list

Examples

as_harp_list(
  a = as_harp_df(data.frame(
    valid_dttm = as_dttm(seq_dttm(2021010100, 2021010123)),
    a_det = runif(24)
  )),
  b = as_harp_df(data.frame(
    valid_dttm = as_dttm(seq_dttm(2021010100, 2021010123)),
    b_det = runif(24)
  ))
)
#>  a
#> ::deterministic point forecast:: # A tibble: 24 × 3
#>    fcst_model valid_dttm           fcst
#>  * <chr>      <dttm>              <dbl>
#>  1 a          2021-01-01 00:00:00 0.697
#>  2 a          2021-01-01 01:00:00 0.101
#>  3 a          2021-01-01 02:00:00 0.819
#>  4 a          2021-01-01 03:00:00 0.235
#>  5 a          2021-01-01 04:00:00 0.863
#>  6 a          2021-01-01 05:00:00 0.204
#>  7 a          2021-01-01 06:00:00 0.369
#>  8 a          2021-01-01 07:00:00 0.958
#>  9 a          2021-01-01 08:00:00 0.210
#> 10 a          2021-01-01 09:00:00 0.727
#> # ℹ 14 more rows
#> 
#>  b
#> ::deterministic point forecast:: # A tibble: 24 × 3
#>    fcst_model valid_dttm             fcst
#>  * <chr>      <dttm>                <dbl>
#>  1 b          2021-01-01 00:00:00 0.158  
#>  2 b          2021-01-01 01:00:00 0.246  
#>  3 b          2021-01-01 02:00:00 0.118  
#>  4 b          2021-01-01 03:00:00 0.838  
#>  5 b          2021-01-01 04:00:00 0.925  
#>  6 b          2021-01-01 05:00:00 0.996  
#>  7 b          2021-01-01 06:00:00 0.694  
#>  8 b          2021-01-01 07:00:00 0.00828
#>  9 b          2021-01-01 08:00:00 0.630  
#> 10 b          2021-01-01 09:00:00 0.558  
#> # ℹ 14 more rows
#> 
as_harp_list(
  a = as_harp_df(data.frame(
    valid_dttm = as_dttm(seq_dttm(2021010100, 2021010123)),
    a_mbr000  = runif(24),
    a_mbr001  = runif(24)
  )),
  b = as_harp_df(data.frame(
    valid_dttm = as_dttm(seq_dttm(2021010100, 2021010123)),
    b_mbr000 = runif(24),
    b_mbr001 = runif(24)
  ))
)
#>  a
#> ::ensemble point forecast:: # A tibble: 24 × 3
#>    valid_dttm          a_mbr000 a_mbr001
#>  * <dttm>                 <dbl>    <dbl>
#>  1 2021-01-01 00:00:00   0.371     0.726
#>  2 2021-01-01 01:00:00   0.311     0.900
#>  3 2021-01-01 02:00:00   0.653     0.799
#>  4 2021-01-01 03:00:00   0.842     0.709
#>  5 2021-01-01 04:00:00   0.524     0.257
#>  6 2021-01-01 05:00:00   0.0216    0.109
#>  7 2021-01-01 06:00:00   0.0986    0.143
#>  8 2021-01-01 07:00:00   0.502     0.846
#>  9 2021-01-01 08:00:00   0.666     0.927
#> 10 2021-01-01 09:00:00   0.0821    0.598
#> # ℹ 14 more rows
#> 
#>  b
#> ::ensemble point forecast:: # A tibble: 24 × 3
#>    valid_dttm          b_mbr000 b_mbr001
#>  * <dttm>                 <dbl>    <dbl>
#>  1 2021-01-01 00:00:00    0.883   0.0807
#>  2 2021-01-01 01:00:00    0.817   0.292 
#>  3 2021-01-01 02:00:00    0.239   0.688 
#>  4 2021-01-01 03:00:00    0.380   0.176 
#>  5 2021-01-01 04:00:00    0.634   0.224 
#>  6 2021-01-01 05:00:00    0.897   0.411 
#>  7 2021-01-01 06:00:00    0.245   0.649 
#>  8 2021-01-01 07:00:00    0.206   0.459 
#>  9 2021-01-01 08:00:00    0.744   0.433 
#> 10 2021-01-01 09:00:00    0.501   0.536 
#> # ℹ 14 more rows
#>