How to realize rowSum with collapse::?

It would be easier to help if you posted some example data and the expected results, as described here.