It appears that each application of dist_transformed() causes an extra nesting level to be added in the output list of quantile() when using quantile() with multiple probabilities. E.g.:
> x = dist_normal(0:1,1)
> str(quantile(x, c(0, 0.5, 1)))
List of 2
$ : num [1:3] -Inf 0 Inf
$ : num [1:3] -Inf 1 Inf
> str(quantile(exp(x), c(0, 0.5, 1)))
List of 2
$ :List of 1
..$ : num [1:3] 0 1 Inf
$ :List of 1
..$ : num [1:3] 0 2.72 Inf
> str(quantile(log(exp(x)), c(0, 0.5, 1)))
List of 2
$ :List of 1
..$ :List of 1
.. ..$ : num [1:3] -Inf 0 Inf
$ :List of 1
..$ :List of 1
.. ..$ : num [1:3] -Inf 1 Inf
Where the output in all cases should have the same shape as the first call to quantile on the untransformed distribution.
(I tested this on the latest github version on master)
With only a single probability there is no problem:
It appears that each application of
dist_transformed()
causes an extra nesting level to be added in the output list ofquantile()
when usingquantile()
with multiple probabilities. E.g.:Where the output in all cases should have the same shape as the first call to quantile on the untransformed distribution.
(I tested this on the latest github version on master)
With only a single probability there is no problem: