I'm experimenting with the new RleArrays from DelayedArray, and I was happy to see most operations work seamlessly just like a normal matrix.
I often use the the very fast rowsum function to aggregate rows of matrix, but this does not seem to work on an RleArray. Is there an alternative to the rowsum-function in for RleArrays?
Note that you can simply do
as.data.frame(DF)
to turnDF
into an ordinary data.frame.However it's important to keep in mind that converting a DataFrame of Rle's to an ordinary data.frame in order to operate on it kind of defeats the purpose of using a DataFrame of Rle's in the first place.
Edit: Forgot to mention that
rowsum()
for DelayedArray objects (including for RleArray objects) was implemented a while ago in the DelayedArray package.