\HeaderA{prop.table}{Express Table Entries as Fraction of Marginal Table}{prop.table}
\keyword{array}{prop.table}
\begin{Description}\relax
This is really \code{sweep(x, margin, margin.table(x, margin), "/")}
for newbies, except that if \code{margin} has length zero, then one
gets \code{x/sum(x)}.
\end{Description}
\begin{Usage}
\begin{verbatim}
prop.table(x, margin=NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] table 
\item[\code{margin}] index, or vector of indices to generate margin for
\end{ldescription}
\end{Arguments}
\begin{Value}
Table like \code{x} expressed relative to \code{margin}
\end{Value}
\begin{Author}\relax
Peter Dalgaard
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{margin.table}{margin.table}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
m <- matrix(1:4,2)
m
prop.table(m,1)
\end{ExampleCode}
\end{Examples}

