#Suppose x is a matrix x<-matrix() #Vector of Row sums of x rowSums(x) #Vector of Col sums of x colSums(x)