Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Using complete with a subset of levels silently drops observations #493
Based upon the description of complete its purpose is to add missing observations for specific combinations of variable values. I believe therefore it is not very intuitive for it to silently drop observations if certain levels are not present, for example:
This code silently drops all observations with Species = setosa
I would propose either changing the function to use a full_join() to ensure the original data is preserved or at the very least adding a warning/message so the user is aware that data has been lost.
I am happy to make a PR if people agree this is a beneficial change.