# latex_table_cont: Produce (LaTeX) Summaries for Continuous Variables In papeR: A Toolbox for Writing Pretty Papers and Reports

## Description

The function produces LaTeX tables with summary statistics for continous variables. It makes use of the booktabs package in LaTeX to obtain tables with a nice layout.

## Usage

 1 2 3 latex.table.cont(..., caption = NULL, label = NULL, table = c("tabular", "longtable"), align = NULL, floating = FALSE, center = TRUE) 

## Arguments

 ... arguments for summarize. See there for details. caption (optional) character string. Caption of LaTeX table. Note that captions are suported for all tables (see also details below). label (optional) character string. Label of LaTeX table specified as \label{"label"}. table character string. LaTeX table format, currently either "tabular" (default) or "longtable". align character string. LaTeX alignment of table rows, per default "llr...r", where "r" is repeated ncol - 1 times. floating logical (default: FALSE). Determines whether the table is a floating object (i.e. use a table environment or not). Note that a longtable cannot be a floating object but captions can be used. center logical (default: TRUE). Determines if table should be centered.

## Details

This function is deprecated and only available for backward comaptibility. Use summarize for more flexibility.

The output requires \usepackage{booktabs} in the LaTeX file.

Captions can be added to both, longtables and tabulars. In the latter case, captions are also suported if the table is no floating object. In this case, the LaTeX package capt-of is required.

## Value

The output is printed with LaTeX style syntax highlighting to be used e.g. in Sweave chunks with results=tex.

## Author(s)

Benjamin Hofner

latex.table.fac and get_option
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ## Example requires package nlme to be installed and loaded if (require("nlme")) { ## Use dataset Orthodont data(Orthodont, package = "nlme") ## Get summary for continuous variables latex.table.cont(Orthodont) ## Change statistics to display latex.table.cont(Orthodont, quantiles = FALSE) latex.table.cont(Orthodont, count = FALSE, quantiles = FALSE) latex.table.cont(Orthodont, mean_sd = FALSE) ## Show column 'Missing' even if no missings are present latex.table.cont(Orthodont, show.NAs = TRUE) ## Change variables to display latex.table.cont(Orthodont, variables = "age") ## What happens in the display if we introduce some missing values: set.seed(1907) Orthodont\$age[sample(nrow(Orthodont), 20)] <- NA latex.table.cont(Orthodont) }