Turn a vector of quantile distributions into a list-col
Source:R/pivot_quantiles.R
nested_quantiles.Rd
Details
This function is deprecated. The recommended alternative is
hardhat::quantile_pred()
with tibble::as_tibble()
Examples
pred_quantile <- quantile_pred(matrix(rnorm(20), 5), c(.2, .4, .6, .8))
nested_quantiles(pred_quantile)
#> Warning: `nested_quantiles()` was deprecated in epipredict 0.1.11.
#> ℹ Please use `hardhat::quantile_pred()` instead.
#> # A tibble: 5 × 1
#> data
#> <list>
#> 1 <tibble [4 × 2]>
#> 2 <tibble [4 × 2]>
#> 3 <tibble [4 × 2]>
#> 4 <tibble [4 × 2]>
#> 5 <tibble [4 × 2]>
pred_quantile %>%
as_tibble() %>%
tidyr::nest(.by = .row) %>%
dplyr::select(-.row)
#> # A tibble: 5 × 1
#> data
#> <list>
#> 1 <tibble [4 × 2]>
#> 2 <tibble [4 × 2]>
#> 3 <tibble [4 × 2]>
#> 4 <tibble [4 × 2]>
#> 5 <tibble [4 × 2]>