I don't know what's wrong, but you might get an answer more quickly if you:
- Move your post to the RStudio IDE category
- Consider editing the title (cross tabulation is working fine, the problem seems to lie in how the RStudio IDE Viewer is rendering the styled HTML output).
- Supply a self-contained sample of your code, so your helpers can make sure they're testing the same scenario.