Closed nicholasjhorton closed 5 years ago
This stems from writing generic code that uses ...
rather than customizing for each distribution:
> xpf
function (...)
pdist("f", ...)
So, as currently implemented, distribution parameters must be named arguments. But we could change this to
> xpf
function (q, df1, df2, ...)
pdist("f", q = q, df1 = df1, df2 = df2, ...)
Of course, we should then do this to the full suite of xp, and xq functions:
[1] "xpbeta" "xpbinom" "xpchisq" "xpdrows.data.frame"
[5] "xpf" "xpgamma" "xpgeom" "xpnbinom"
[9] "xpnorm" "xppois" "xpt" "xqbeta"
[13] "xqbinom" "xqchisq" "xqf" "xqgamma"
[17] "xqgeom" "xqnbinom" "xqnorm" "xqpois"
[21] "xqqmath" "xqt"
Seems to be working:
library(mosaic)
1 - xpf(1.5938, df1 = 2, df2 = 445)
## [1] 0.2043096
1 - xpf(1.5938, 2, 445)
## [1] 0.2043096
I'll update some more distributions and then push (on beta).