htmlTable {HKRbook}R Documentation

htmlTable

Description

Creates a HTML table from a two dimensional table object.

Usage

htmlTable(
  tab,
  vars = NULL,
  lines = NULL,
  cex = 1,
  title = "",
  rowsum = NULL,
  colsum = NULL,
  fmt = "%.0f",
  total = NULL,
  ...
)

Arguments

tab

two dimensional table object

vars

character: names of row and column variable

lines

character: final line (default: NULL)

cex

numeric: font size (default: 1)

title

character: table title (default: '')

rowsum

character: add row sums at the right (default: NULL)

colsum

character: add column sums at the bottom (default: NULL)

fmt

character: format string for sprintf (default: "%.0f")

total

character: add the grand total at the bottom left (default: NULL)

...

further parameters given to html_matrix

Value

html_matrix object

Examples

htab <- htmlTable(apply(Titanic,1:2,sum), c("Sex", "Class"), title="Titanic")
toHTML(htab, browser=interactive())

[Package HKRbook version 0.1.3 Index]