\Header{margin.table}{Compute table margin}
\keyword{array}{margin.table}
\begin{Description}\relax
Compute the sum of table entries over a given index.\end{Description}
\begin{Usage}
\begin{verbatim}
margin.table(x, margin)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] an array
\item[\code{margin}] index number (1 for rows, etc.) 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This is really just \code{apply(x,margin,sum)} packaged up for newbies.\end{Details}
\begin{Value}
The relevant marginal table.\end{Value}
\begin{Author}\relax
Peter Dalgaard\end{Author}
\begin{Examples}
\begin{ExampleCode}
m<-matrix(1:4,2)
margin.table(m,1)
margin.table(m,2)
\end{ExampleCode}
\end{Examples}

