I have two tex files that I want to combine in order to make one table. In the first.tex, the data is like this:
var 1 & num & num & num & num \\
& num & num & num & num \\
I have a second.tex that has the same structure as before, even the same variable name:
var 1 & num & num & num & num \\
& num & num & num & num \\
Both tex files are exported from STATA without columns names or notes. My desired output would be something like this:
var 1 & num & num & num & num & num & num \\
& num & num & num & num & num & num \\
Therefore, I am hiding column 4 in both tex files, and column 1 of the second tex file. My issue is on how I include both tex file and have a fixed table header.
Within the document tex file, I have created a table using threeparttable
\begin{table}[H]
\centering
\caption{Balance: \label{tab:summary_rct1}}
\begin{threeparttable}
\centering
%\begin{tabular}{l*{1}{ccHcHccHc}}
\toprule
& (1) & (2) & & (3) & & (4) & (5) & & (6) \\
& T & C & & D & & T & C & & D \\
\midrule
\addlinespace
\input{tables/first.tex}%
\input{tables/second.tex}%
\end{tabular}
\begin{tablenotes}
\footnotesize
\item Some footnotes
\end{tablenotes}
\end{threeparttable}
\end{table}
As you notice, given that the header is fixed, I have to hide column 4, column 6 and column 9. If I do the above code, the second.tex file will be positioned below first.tex but I wanted to be next to it.
Is there a clean way to do this? I have tried what it is expressed in this post, only using the first.tex and second.tex without including the table header like this:
\begin{tabular}{lccHc}
\input{first}%
\end{tabular}%
\begin{tabular}{HccHc}
\input{second}%
\end{tabular}
Nonetheless, when I include the table header and use threeparttable, I don't get my desired output.