Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR closes #359.
Most things look correct to me - I have addressed the issue of
num_bins
not being reflected by ensuring 0 and 1 are always included as boundaries and cleaned up some of the other code/docs (see individual commit messages).There were two broader questions raised by this work:
get_pit
andplot_pit
interact makes addressing Randomised -> non-randomised PIT for count values #913 impossible - the nonrandomised method requires the bins to be known at the time the PIT is calculatedBoth of these cases could be solved if the
get_pit()
method is changed to take the bins/breaks as an argument, all calculations/approximations are moved there, andplot_pit
just plots the resultinggeom_col
(which may or may not even be needed as a separate function - e.g.get_pit
could have aplot
argument or else it could just be left to the user). I would suggest to make this change (in a separate issue/PR combo).Checklist
lintr::lint_package()
to check for style issues introduced by my changes.