I am using kable to make tables of my data in RMarkdown. You can supposedly adjust column width using the column_spec command, however this seems to adjust only the columns of the data, itself, but does not also adjust the column width of my header row. So now my headers no longer line up with their associated column of data.
For example:
y <- knitr::kable(head(mtcars), "html")
column_spec(y, 1:4, width="5em")