You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functions like mean(), sum(), and others typically include an na.rm parameter, which allows you to control whether NA values should be excluded from calculations. However, it appears that aggregation functions in scuttle do not provide an option for excluding NA values. While one could convert NA values to 0, this approach is not appropriate for calculating the mean.
Could an na.rm option be added to handle this case?
Hm... it's very unusual to have NA in a single-cell count matrix. In fact, I don't think I've ever seen an NA in any assay matrix for any technology I've worked on.
I suppose it's possible to add an na.rm= option, but it's not a scenario that I've ever encountered, so I'm afraid it's not a high priority for me at the moment. If you want to give it a crack, I'm happy to consider a PR. Otherwise, you might consider some more expedient solutions:
Just filter out rows with NAs, if they are going to be all-NA rows.
Use DelayedArray::rowsum, which does have a na.rm= option.
NAs might occur, for instance, when datasets are merged. I think na.rm option would be good addition. I can create a PR, I will come back to you this week
Hi,
Functions like
mean()
,sum()
, and others typically include anna.rm
parameter, which allows you to control whetherNA
values should be excluded from calculations. However, it appears that aggregation functions inscuttle
do not provide an option for excludingNA
values. While one could convertNA
values to0
, this approach is not appropriate for calculating the mean.Could an
na.rm
option be added to handle this case?The text was updated successfully, but these errors were encountered: