Answers for "how to get sum of rows and columns of a matrix in R"

0

how to get sum of rows and columns of a matrix in R

#Suppose x is a matrix
x<-matrix()

#Vector of Row sums of x
rowSums(x)
#Vector of Col sums of x
colSums(x)
Posted by: Guest on November-11-2020

Code answers related to "how to get sum of rows and columns of a matrix in R"

Browse Popular Code Answers by Language