I'm trying to create a table which looks like
but I'm not really sure how to incorporate multiple spanning rows and columns together (to add 'Organism 1' and 'Organism 2'). I've gotten to this point so far:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{r|c|c|}
\multicolumn{1}{r}{}
& \multicolumn{1}{c}{$S$}
& \multicolumn{1}{c}{$T$} \\cline{2-3}
$S$ & $a,a$ & $b,c$ \\cline{2-3}
$T$ & $c,b$ & $d,d$ \\cline{2-3}
\end{tabular}
\end{document}
And it currently looks like this:
Can anyone suggest how to add the top 'Organism 2' and left 'Organism 1' row/column entries?
thanks!
Best Answer
starting from your code, I got to this:
Basically, I have added the package
multirow
and changed thecline
indexes.