ABSTRACT

Graphs and other visual methods, discussed in the next chapter, can often be more effective ways to present descriptive and inferential statistics than tables. Manually typing results into tables by hand is tedious, not very reproducible, and can introduce errors. There are a number of ways to turn R objects into tables that can be dynamically included in LaTeX or Markdown/HTML markup. Automating table creation removes the possibility of adding errors to the presentation of the analyses by incorrectly copying output, a big potential problem in hand-created tables. Float environments allow to separate a table from the text, specify its location, and give it a caption. Markdown table syntax, as with all Markdown syntax, is generally much simpler than LaTeX’s tabular syntax. The markup is much more human readable. Nonetheless, larger tables can still be tedious to create. The kable, texreg, and xtable packages are very convenient for model objects they know how to handle.