We have rowCounts(x, value = 10) as an efficient version of rowSums(x == 10). It'd be neat to have similarly efficient versions of rowSums(x > 10), rowSums(x >= 10), rowSums(x <= 10), rowSums(x < 10), and rowSums(x != 10).
Conceptually, it could be it's own function or it might add an argument to col/rowCounts(), something like:
We have
rowCounts(x, value = 10)
as an efficient version ofrowSums(x == 10)
. It'd be neat to have similarly efficient versions ofrowSums(x > 10)
,rowSums(x >= 10)
,rowSums(x <= 10)
,rowSums(x < 10)
, androwSums(x != 10)
.Conceptually, it could be it's own function or it might add an argument to
col/rowCounts()
, something like: