Skip to content

Commit

Permalink
warn of behaviour change
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Oct 6, 2023
1 parent 1804556 commit 27c1140
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions R/dist.R
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,14 @@ tune_inv_gamma <- function(lower = 2, upper = 21) {
dist_spec <- function(mean, sd = 0, mean_sd = 0, sd_sd = 0,
distribution = c("lognormal", "gamma"), max,
pmf = numeric(0), fixed = FALSE) {
## deprecate previous behaviour
warning(
"The meaning of the 'max' argument has changed compared to ",
"previous versions. It now indicates the maximum of a distribution ",
"rather than the length of the probability mass function (including 0) ",
"that it represented previously. To replicate previous behaviour reduce ",
"max by 1".
)
## check if parametric or nonparametric
if (length(pmf) > 0 &&
!all(
Expand Down

0 comments on commit 27c1140

Please sign in to comment.