I know that there are already similar questions to this on stack exchange, but I am working in R studio with the Stargazer library and I want to be able to directly copy and paste my tables into overleaf and have them be centered (the problem is that they are often too big and fall off the edge of the page). Is there some easy way to center these tables without having to recode the tables in any way? A lot of other responses I have seen are hard for me to follow because I am trying not to have to recode the tables. The whole perk of using Stargazer is that it makes the tables for you... :/
Below is an example table (obviously fake results):
\begin{table}[!htbp] \centering
\caption{}
\label{}
\begin{tabular}{@{\extracolsep{5pt}}lccccccc}
\\[-1.8ex]\hline
\hline \\[-1.8ex]
Statistic & \multicolumn{1}{c}{N} & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Pctl(25)} & \multicolumn{1}{c}{Pctl(75)} & \multicolumn{1}{c}{Max} \\
\hline \\[-1.8ex]
Marriage & 10000 & 100000 & 10000 & 10000 & 1000 & 10000 & 1000000 \\
Real Income & 10000 & 100000 & 10000 & 10000 & 1000 & 10000 & 1000000 \\
Unemployment & 10000 & 100000 & 10000 & 10000 & 1000 & 10000 & 1000000 \\
\hline \\[-1.8ex]
\end{tabular}
\end{table}
EDIT: I am not sure why the table is not showing up correctly here, but it will in overleaf.



\resizebox(or its close relative,adjustbox) to inflict shrinkage on the tabular material in order to limit the width. However, that's also the absolutely worst solution from a typographic point of view. Indeed, nothing screams as loudly and unmistakably "hacker solution that doesn't care a fig about legibility or aesthetics" as the the\resizeboxapproach does. – Mico Apr 21 '21 at 04:52