powered by
colsums(x) rowsums(x)
colsums
x <- matrix(rpois(1000 * 1000,10),ncol = 1000) x1 <- colsums(x) x2 <- colSums(x) x1 == x2 x1 <- rowsums(x) x2 <- rowSums(x) x1 == x2
Run the code above in your browser using DataLab