-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The probability distribution functions in base R (such as stats::dnbinom) accept arguments with different lengths and produce an output whose length is equal to the length of the largest argument.
They then recycle their shorter arguments when performing the calculations.
This can be convenient, but it also limits what mistakes we can detect.
I think we should be much more strict about the length of function arguments we accept.
Only allowing scalars or vectors which are the same length as each other would be very flexible, but also rule out quite a few common mistakes.
In any case, we need to check that all functions have consistent requirements and that they are document.
Metadata
Metadata
Assignees
Labels
No labels