Skip to contents

Modify distribution parameters. A lightweight function that only checks that the parameter you're modifying already exists in the distribution.

Usage

mutate_parameters(distribution, ...)

Arguments

distribution

Parametric distribution

...

Named expressions; quoted. Names should be parameters names of the distribution. Expressions can involve computations with other parameters.

Value

The input distribution, with the parameters modified as specified in ....

Details

Parameters are not modified on-the-fly. That means parameters that are modified earlier in ... still retain their original values for use downstream in ....

Examples

d <- distionary::dst_unif(1, 3)
distplyr:::mutate_parameters(d, min = max - min)
#> [1] "unif"       "parametric" "dst"       
#> 
#>  name :
#> [1] "unif"