It is exactly the same

tmp <- matrix(1:24,6,4)
tmp[4,] <- NA
tmp
apply(tmp, 2, sum, na.rm=TRUE)

	[[alternative HTML version deleted]]

