\begin{Schunk}
\begin{Sinput}
 t1 <- table(dat$gunlaw, dat$owngun)
 t1
\end{Sinput}
\begin{Soutput}
          YES   NO REFUSED
  FAVOR   464 1085      17
  OPPOSE  192  193      10
\end{Soutput}
\begin{Sinput}
 prop.table(t1, 2)
\end{Sinput}
\begin{Soutput}
               YES        NO   REFUSED
  FAVOR  0.7073171 0.8489828 0.6296296
  OPPOSE 0.2926829 0.1510172 0.3703704
\end{Soutput}
\begin{Sinput}
 addmargins(t1)
\end{Sinput}
\begin{Soutput}
          YES   NO REFUSED  Sum
  FAVOR   464 1085      17 1566
  OPPOSE  192  193      10  395
  Sum     656 1278      27 1961
\end{Soutput}
\end{Schunk}
