-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
agglomeration functions and na.rm #658
Conversation
How about |
row.rm might also be one option to keep it short. I think we could use same name for both |
ok to me as long as it is consistent. |
The parameter name for removing NA rows is |
After discussing in scuttle package, it was decided that na.rm will not be implemented in scuttle. This is why it is implemented in mia. mia uses scuttle function by default. If |
In this issue #654, we noticed that the use of
na.rm
is not intuitive in agglomeration functions.This PR adds option for excluding NAs in agglomeration functions (
agglomerateByRank
,agglomerateByVariable
andagglomerateByPrevalence
).na.rm
now works similarly tosum(x, na.rm = TRUE)
in these aforementioned functions.In
agglomerateByVariable
na.rm
controlled whether we remove those rows that did not have any group information, i.e., their group wasNA
. Now this parameter is namedgroup.rm
.In
agglomerateByRank
na.rm
controlled whether we remove those rows that did not have any taxonomy information. Now this parameter is calledempty.rows.rm
.These parameter names can be still modified. Maybe we could unify so that both would have parameter
empty.row.rm
.na.rm
is now handled in mia, but I opened issue inscuttle
if this can be handled directly in function that mia utilizes: LTLA/scuttle#33Let's wait until the issue in scuttle is solved.