alexpghayes / distributions3

Probability Distributions as S3 Objects
https://alexpghayes.github.io/distributions3/
Other
100 stars 16 forks source link

Adapt methods #69

Closed mnlang closed 2 years ago

mnlang commented 2 years ago

Hello Alex,

according to our communication in PR #67, I have renamed the arguments from d to x for the functions computing the moments of probability distributions in order to be in line with the generic mean(). I have adapted this equivalently for random() and quantile(), allowing a regular dispatch to the generic quantile().

Summary of changes:

Even though there is no distributions3 specific manual page for quantile() anymore, I think this improves the package now, because: 1) This solves the warning regarding stats:::quantile.default and still solves Issue #58. 2) Various packages provide their own quantile methods - these now work with the adpations.

I hope this is in your interest, otherwise I can of course change parts according to your suggestions.

Cheers

alexpghayes commented 2 years ago

Thank for this, this is incredible!