Answers for "get sum in one colum r"

R
0

r sum based on two columns

aggregate(x$Frequency, by=list(Category=x$Category), FUN=sum)
  Category  x
1    First 30
2   Second  5
3    Third 34
Posted by: Guest on March-25-2020
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 "get sum in one colum r"

Browse Popular Code Answers by Language