library(epipredict)
distn <- dist_quantiles(
list(1:5, 1:5, c(NA, NA), 1:2),
list(1:5/6, 1:5/6, 1:2/3, 1:2/3)
)
quantile(distn, p = .5)
#> Error in `quantile_extrapolate()`:
#> ! Quantile extrapolation is not possible with fewer than 2 quantiles.
quantile(distn[-3], p = .5)
#> [1] 3.0 3.0 1.5
quantile(distn, p = .5, na.rm = TRUE)
#> Error in `quantile_extrapolate()`:
#> ! Quantile extrapolation is not possible with fewer than 2 quantiles.
Created on 2024-10-17 with reprex v2.1.1