[Tex/LaTex] Make two tables the same size

tables

How do I make two tables with different the same size?

Picture showing the problem

Here is my code:

\begin{table}[]
\resizebox{\columnwidth}{!}{%
\begin{tabular}{ccccc}
\hline
\multicolumn{5}{|c|}{\cellcolor[HTML]{EFEFEF}\textbf{Summary of glioblastoma qualitative radiogenomic results}}                                                                                                                                           \\ \hline
\multicolumn{1}{|c|}{\textbf{Reference}} & \multicolumn{1}{c|}{\textbf{Year}} & \multicolumn{1}{c|}{\textbf{Gene}} & \multicolumn{1}{c|}{\textbf{Method}} & \multicolumn{1}{c|}{\textbf{Qualitative features associated with gene mutations}} \\ \hline
\cite{carillo_table}                                        & 2012                               & IDH1                               & Logistic Regression                  & Frontal lobe, les enhancement, smaller size                                       \\
\cite{paldor_table}                                        & 2016                               & IDH1                               & Chi-square test                      & Frontal Lobe                                                                      \\
\cite{aghi_table}                                        & 2005                               & EGFR                               & Student t-test                       & Increased edema-enhancing tumor ratio; ill-defined T2 margins                     \\ \cite{ellingson_table}
                                         & 2013                              & EGFR                               & Fisher's exact test                  & Left temporal lobe                                                                \\  \cite{young_table} 
                                         & 2013                             & EGFR                               & Wilcoxon signed-rank test            & Lower ADC                                                                         \\ \cite{gupta_table}
                                         & 2015                               & EGFR                               & Wilcoxon signed-rank test            & Increased cerebral blood volume, decreased peak signal recovery                                                       
\end{tabular}
}%
\caption{Radiogenomics studies carried out on glioblastoma that have studied the association between \textit{qualitative} imaging features and gene mutations in IDH and EGFR; source: Chow et. al (2017)\cite{imaging_hetero}}
\label{table:qualitative}
\end{table}

and

\begin{table}[]
\begin{tabular}{cccccc}
\hline
\multicolumn{6}{|c|}{\cellcolor[HTML]{EFEFEF}Summary of glioblastoma quantitative radiogenomic results}                                                                                            \\ \hline
\multicolumn{1}{|c|}{Refrence} & \multicolumn{1}{c|}{Year} & \multicolumn{1}{c|}{Gene} & \multicolumn{1}{c|}{Radiomics features} & \multicolumn{1}{c|}{Classifier} & \multicolumn{1}{c|}{Accuracy} \\ \hline
\cite{zhang_table}                              & 2017                      & IDH1                      & FOS, SOS                                & Random Forest                   & 0.89                          \\
\cite{levner_table}                              & 2009                      & MGMT                      & SOS                                     & Neural Network                  & 0.877                         \\
\cite{korfiatis_table}                              & 2016                      & MGMT                      & SOS                                     & SVM, Random Forest              &                               \\
\cite{kickingereder_table}                              & 2016                      & EGFR                      &      FOS                                   &                                 & 0.63                          \\
\multicolumn{1}{l}{}           & \multicolumn{1}{l}{}      & \multicolumn{1}{l}{}      & \multicolumn{1}{l}{}                    & \multicolumn{1}{l}{}            & \multicolumn{1}{l}{}         
\end{tabular}
\caption{Radiogenomics studies carried out on glioblastoma that have studied the association between \textit{quantitative} imaging features and gene mutations; source: Chow et. al (2017)\cite{imaging_hetero} }
\label{table:quantitative}
\end{table}

I tried solving it with \adjustbox but this didn't help

Best Answer

I would build your tables more like the ones below. I removed the first head row as it seems redundant to the \caption.

\documentclass[]{article}

\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{siunitx}

\newcolumntype{x}[1]{>{\hsize=#1\hsize\linewidth=\hsize}X}

\begin{document}
\begingroup
\small
\noindent
\tabcolsep=.7\tabcolsep
\begin{tabularx}{\linewidth}{ccc>{\raggedright\arraybackslash}x{.7}x{1.3}}
  \toprule
  Reference & Year & Gene & Method
    & Qualitative features associated with gene mutations \\
  \midrule
  \cite{carillo_table}   & 2012 & IDH1 & Logistic Regression
    & Frontal lobe, les enhancement, smaller size \\
  \cite{paldor_table}    & 2016 & IDH1 & Chi-square test
    & Frontal Lobe \\
  \cite{aghi_table}      & 2005 & EGFR & Student t-test 
    & Increased edema-enhancing tumor ratio; ill-defined T2 margins \\
  \cite{ellingson_table} & 2013 & EGFR & Fisher's exact test
    & Left temporal lobe \\  
  \cite{young_table}     & 2013 & EGFR & Wilcoxon signed-rank test
    & Lower ADC \\
  \cite{gupta_table}     & 2015 & EGFR & Wilcoxon signed-rank test
    & Increased cerebral blood volume, decreased peak signal recovery \\
  \bottomrule
\end{tabularx}
\begin{tabular}{cccclS[table-format=1.3]}
  \toprule
  Reference & Year & Gene & Radiomics features & Classifier & {Accuracy} \\
  \midrule
  \cite{zhang_table}         & 2017 & IDH1 & FOS, SOS & Random Forest
    & 0.89 \\
  \cite{levner_table}        & 2009 & MGMT & SOS      & Neural Network
    & 0.877 \\
  \cite{korfiatis_table}     & 2016 & MGMT & SOS      & SVM, Random Forest
    & \\
  \cite{kickingereder_table} & 2016 & EGFR & FOS      &
    & 0.63 \\
  \bottomrule
\end{tabular}
\endgroup
\end{document}

enter image description here

As you can see, the second tabular is slightly smaller. I also left out the table environment, but that shouldn't change much. \tabcolsep=.7\tabcolsep reduces the separation between the columns to 70 %. The \noindent is not necessary inside of table. If the two tabulars end up in different table environments, you should use \small and \tabcolsep=.7\tabcolsep in both of them.

EDIT: One should mention, that the sum of all arguments to the x columns in one tabularx must total the number of x columns in that tabularx. So if you use 2 x columns, the sum must be 2.

Related Question