% Generated by roxygen2: do not edit by hand
\name{rowSums}
\alias{rowSums}
\alias{colSums}
\title{Row and Column Sums of a Matrix/Data Frame}
\arguments{
  \item{x}{a numeric matrix or data frame
}
}

\details{
Compute row sums of a matrix
\code{
(A <- matrix(1:9, nrow = 3))
rowSums(A)  # = apply(A, 1, sum)
}

Compute column sums of a matrix
\code{
colSums(A)  # = apply(A, 1, sum)
}

Compute row sums of a data frame
\code{
df <- data.frame(a = 1:3, b = 4:6, c = 7:9)
rowSums(df)  # row sums of the data frame
}}

