DMlatexSummaryby: Print LaTeX tables of summary statistics broken down by...

Description Usage Arguments Value Note Author(s) See Also Examples

Description

LaTex output of summary statistics of a data frame. Prints one line for minimum, maximum median, mean, quartiles, number of elements, standard deviation and standard error for each numerical variable. A separate table is written for each unique combinations of factors. Labeling and generation of captions is automatic.

Usage

1
2
3
4
DMlatexSummaryby(object, title = "", INDICES = NULL, file = "",
  caption = "%s", label = "", ctable = FALSE, rowlabel = "",
  moredec = 0, where = "!htbp", onetable = NULL, lang = "en",
  noQuantiles = FALSE, ...)

Arguments

object

data frame with numerical and factor variables

title

to be printed in upper left corner

INDICES

a factor or list of factors for breakdown. Defaults to no breakdown, resulting in one detail table only.

file

output file name; default prints output to the standard output, which is the choice for Sweave.

caption

text for caption, with sprintf substitions. Defaults to factor combination, followed by explanation of the column headers.

label

if no label given, label of table, defaults to tab:<factorname1><factor1>:<factornameN><factorN>. If not "", and there is no colon in the label, tab:<label>.<factorname1>... is used as table label. If there is a colon in the label, the label is used as is.

ctable

Uses ctable-formatting of LaTeX by default.

rowlabel

optional text for left table header cell.

moredec

Show more decimals than by default. Fractional values, e.g. 0.5 can be used here such that boundary case are rounded up instead of down

where

positioning parameter for LaTeX

onetable

If TRUE, force multiple tables into one. If FALSE, print one table per combination of factors. Internally set to TRUE when there is only one numerical factor.

lang

Language, currently en (default) or de.

noQuantiles

Suppress quantiles if TRUE

...

Additional parameters passed to latex in Hmisc.

Value

Returns the result of the call to latex in Hmisc.

Note

Requires ctable in your Snw/tex file. In a multi-table breakdown, only the caption of the first table has the explanation of the headers.

Author(s)

Dieter Menne, dieter.menne@menne-biomed.de

See Also

latex, by

Examples

1
2
3
4
5
6
7
8
# one table only
DMlatexSummaryby(warpbreaks)
# a table for each combination
DMlatexSummaryby(warpbreaks,INDICES=c("wool","tension"))
DMlatexSummaryby(warpbreaks,INDICES=c("wool","tension"),noQuantiles=TRUE,
          caption="Warpbreaks %s At the end", file="")
DMlatexSummaryby(warpbreaks,INDICES=c("wool","tension"),
          caption="Warpbreaks %s At the end", file="",onetable=TRUE)

dmenne/dlatex documentation built on May 15, 2019, 9:32 a.m.