-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DS-3646: Catching empty levels when Calibrate called outside widget (#26
) * Empty levels should always be dropped [revdep skip] Empty levels should always be dropped when checking the categorical target variables. Previously, levels were not being dropped when the subset argument is NULL. However, when Calibrate calls categoricalTargets, the default value of subset is NULL, so that any empty categories would not be dropped. Empty categories cause errors when calling rake from the survey package. Users using the widget would never have encountered this error because the widget always passes a non-null value for subset. * Test error case * Ensure weights normalized prior to checking for trims Ensure weights normalized prior to checking for trims
- Loading branch information
1 parent
486cea6
commit 92c995e
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters