\begin{Schunk}
\begin{Sinput}
 xt2 <- xtable(as.table(sum.hsb[[2]][["gender"]]$table), 
                caption = "The Gender Summary", label = "tab:gender", 
                digits = 2)
 print(xt2, table.placement="H", caption.placement="top")
\end{Sinput}
% latex table generated in R 3.5.1 by xtable 1.8-2 package
% Tue Sep 11 14:12:40 2018
\begin{table}[H]
\centering
\caption{The Gender Summary} 
\label{tab:gender}
\begin{tabular}{rr}
  \hline
 & x \\ 
  \hline
Female & 3795 \\ 
  Male & 3390 \\ 
  nobs & 7185 \\ 
  nmiss &   0 \\ 
   \hline
\end{tabular}
\end{table}\end{Schunk}
