DMlatex: Dieter's special shorthand version of Hmisc/latex

Description Usage Arguments Author(s) References See Also Examples

Description

Outputs a data frame, in my personal latex style. label and caption are required, and ctable is the default setting. By default, rownames are not included; uses rownames = NULL to include these.

Usage

1
2
3
DMlatex(object, label, caption, rowname = NULL, longtable = FALSE,
  ctable = FALSE, file = "", where = "!htbp", rowlabel = "",
  mincapwidth, width, cellTexCmds = NULL, lines.page = 10000, ...)

Arguments

object

The object to be printed, usually a data frame

label

Required label

caption

Required caption

rowname

Rownames are not shown by default.

longtable

Uses LaTeX longtable with a very large value for line.pages, effectively disabling this parameter.

ctable

use package ctable for output.

file

optional file name, by default output to console or Sweave document

where

positioning parameter for LaTeX

rowlabel

Label in top left corner

mincapwidth

for ctable, the minimum caption width in mm. Requires ctable1.sty or a more recent update of ctable.

width

for ctable, width of table. Should be given when column type X is used.

cellTexCmds

see latex(Hmisc) documentation

lines.page

set to high value to avoid problem with longtable

...

other parameters forwarded to latex.default. Use rownames=NULL to include rownames.

Author(s)

Dieter Menne

References

Uses latex from Frank Harrel's Hmisc

See Also

latex

Examples

1
2
3
4
5
6
7
8
  DMlatex(warpbreaks[1:10,],"Warpbreak data","tab:warpbreak")
  set.seed(173) # so can replicate results
  sex =  factor(sample(c("m","f"), 500, rep=TRUE))
  age =  rnorm(500, 50, 5)
  treatment =  factor(sample(c("Drug","Placebo"), 500, rep=TRUE))
  x = summary(treatment~age+sex,method="reverse")
  DMlatex(x,caption="This is the reverse caption",
   label="tab.summary.formula.reverse")

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