I am creating a data analysis report using Markdown, knitr.
When I run a piece of code containing a table,
addmargins(table(x$gender, exclude=NULL))
This is what I get:
#
#
#
This is what I want:
#
#
Markdown naturally draws a lot of gaps, and I try to provide as concise a conclusion as possible, as these reports must be printed. These extra lines contain many extra pages.
As far as I saw, this seems to only happen with tables, and not with other code. It seems to be table()
causing the problem by inserting an extra row above the table. Any way to disable this quirk?
source
share