-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add na.rm to aggregating functions #34
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR. I'll address some immediate points first, but having slept on your problem, I would recommend a much simpler solution.
You can see that it is quite tedious to protect against y <- rsparsematrix(10000, 5, density=0.1)
z <- sample(LETTERS[1:5], nrow(y), replace=TRUE)
y[1] <- NA
y <- DelayedArray(y)
is.okay <- !is.na(y)
type(is.okay) <- "double"
DelayedArray::rowsum(y, z, na.rm=TRUE) / DelayedArray::rowsum(is.okay, z) 4 lines and done. No copying involved as the |
Thank you for the feedback! I'm not very experienced with C++, so I jumped straight into the deep end. Your suggestions seems to be working and it is much simpler. I would still tend to think that scuttle is the right place to fix this
Moreover, |
This PR adds
na.rm
option to following functions:sumCountsAcrossFeatures
,numDetectedAcrossFeatures
,summarizeAssayByGroup
,numDetectedAcrossCells
.This PR is related to this issue: #33