code:
{r results = 'asis'}
res <-cars
kable(cars)
output:

any suggestions on how to show a table correctly?
Perhaps kable(mtcars, format='html')?
@yihui
Better, but the table is rendered without border.

That is because tables do not have borders by default in your browser. You need CSS, e.g. https://github.com/yihui/hugo-xmin/blob/4888812fd8e4589f14f629f40136bae507471089/static/css/style.css#L43-L50
Documented at https://slides.yihui.name/xaringan/#19
Most helpful comment
Perhaps
kable(mtcars, format='html')?