I want to include a table in my latex document that I create using knitr package. I "call" the table using:
\begin{table}[H]
\begin{centering}
<<r second part}>>=
kable(Per_cond, booktabs=T,row.names=F)
@
\par\end{centering}
\begin{centering}
\protect\caption{Summary of plate}
\par\end{centering}
\label{Table}
\end{table}
The results is amazing as usual, but as you can see below, some white space is added after every 5 rows.
When created with booktabs=F
those white spaces disappear (second image).
Do you know a way to get rid of those white spaces or (even better) to select where they appear (in this case if they would come after every 4 rows, they would nicely separate my conditions) ? Thank you for your help.
(RStudio 0.98.1062, knitr v 1.9, MikTex 2.9, booktabs packaged 2005-05-04)
Looking at the source of kable
, it calls knitr:::kable_latex
if you're using LaTeX. Then, looking at that source, it has the following argument and default:
linesep = if (booktabs) c("", "", "", "", "\\addlinespace")
So, I'm guessing if you explicitly pass
linesep = c("", "", "", "\\addlinespace")
you'll get spaces every 4 lines as desired.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With