Skip to content
Prev 162609 / 398500 Next

Removing rows with rowsums==0 (I can't figure this out)

On Thu, 2008-11-20 at 12:01 -0500, stephen sefick wrote:
Given your ffg,

## the which() call returns row indices for rows with rowSum > 0
ffg[which(rowSums(ffg) > 0, ]

does the trick

HTH

G