KWB-R/kwb.qmra

create_random_distribution: "norm" (fix to avoid negative values)

Opened this issue · 0 comments

Problem

> vals <- kwb.qmra::create_random_distribution(type = "norm", min = 0, max = 1000 )$events$values
Create 1 random distribution(s): norm (with parameters n: 365, mean: 500.000000, sd: 303.978416)
> hist(vals)

grafik

Proposed fix

> vals_onlypositive <- ifelse(vals < 0, 0, vals)
> hist(vals_onlypositive)

grafik

@wseis does this make sense?