While I initially did not understand why mask() was not named filter, it soon occurred to me that this would overwrite Python's own filter() function. I think it was a good call not to do that.
This said, filter is part of the dplyr "grammer". So, I think a better name for mask would be filter_by(). This pull request simply creates an alias instead of renaming mask(), though I do think that it is a change worth considering.
Note: I also ran a linter on your (very elegant) code. If you'd prefer, I can make that a separate pull request.
While I initially did not understand why
mask()
was not namedfilter
, it soon occurred to me that this would overwrite Python's ownfilter()
function. I think it was a good call not to do that.This said,
filter
is part of the dplyr "grammer". So, I think a better name formask
would befilter_by()
. This pull request simply creates an alias instead of renamingmask()
, though I do think that it is a change worth considering.Note: I also ran a linter on your (very elegant) code. If you'd prefer, I can make that a separate pull request.