I intend to have the result of a logit regression in a nicely formatted table in R. so, I use library(xtable) with print(xtable) function. The result came out in a LaTex document that didn't look "nicely formatted" Any advice on how I could achieve this?
library(xtable)
print(xtable(art1glm))
LaTex Code (result in R)
% latex table generated in R 3.6.1 by xtable 1.8-4 package
% Fri May 08 07:54:12 2020
\begin{table}[ht]
\centering
\begin{tabular}{rrrrr}
\hline
& Estimate & Std. Error & z value & Pr($>$$|$z$|$) \\
\hline
(Intercept) & -7.4517 & 2.0323 & -3.67 & 0.0002 \\
clinton\_vote & 0.1660 & 0.0418 & 3.97 & 0.0001 \\
year\_term\_ends2002 & 0.2660 & 0.5672 & 0.47 & 0.6391 \\
year\_term\_ends2004 & 0.4100 & 0.5675 & 0.72 & 0.4699 \\
first\_term1 & -1.0050 & 0.4819 & -2.09 & 0.0370 \\
\hline
\end{tabular}
\end{table}
I also tried to write the result to a .tex file, didn't work also as pdfLetex gave "!LaTeX Error: Environment table undefined.