I would like to format this table so that "presence of trait i" is printed vertically alongside a vertical rule left of the + and - sign, mimicking the horizontal "presence of trait j" in the following code.
Additionally, I would like to know how to keep the position of "presence of trait j" above column 2 and 3, when I remove the \toprule.
\documentclass[twocolumn]{bmcart}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.14}
\usepackage{booktabs}
\begin{document}
\begin{table}[h]\centering
\pgfplotstabletypeset[
every head row/.style={
before row={\toprule & \multicolumn{2}{c}{presence of trait j} \\\cmidrule{2-3}},
after row=\midrule},
every column/.style={
string type}
]{
Mode - +
+ a b
- c d
}
\end{table}
\end{document}
Thanks in advance!

\documentclass, includes all relevant\usepackagecommands, ends with\end{document}and compiles without errors, even if it does not produce your desired output. – Sandy G Jan 17 '18 at 17:06tabularinstead of apgfplotstable, then you can use https://tex.stackexchange.com/questions/89115/how-to-rotate-text-in-multirow-table. – Marijn Jan 17 '18 at 20:33