rnb.add.table: rnb.add.table

Description Usage Arguments Value Author(s) See Also

View source: R/Report-methods.R

Description

Generates HTML code for a table in the specified report.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rnb.add.table(
  report,
  tdata,
  row.names = TRUE,
  first.col.header = FALSE,
  indent = 0,
  tag.attrs = c(class = "tabdata"),
  thead = NULL,
  tcaption = NULL,
  na = "<span class=\"disabled\">n/a</span>"
)

Arguments

report

Report to write the text to.

tdata

Matrix or data frame to be presented in HTML form. Column names, if present, are used to define table columns. If this table contains 0 (zero) rows or 0 columns, calling this function has no effect.

row.names

Flag indicating if row names should also be printed. If this parameter is TRUE and tdata defines row names, these are printed in the left-most column and are displayed as header cells. Keep in mind that data.frames always define row names.

first.col.header

Flag indicating if all cells in the first column must be displayed as header cells. Note that, if both this parameter and row.names are TRUE, and tdata contains row names, the constructed HTML table will have 2 columns of header cells.

indent

Default indentation, in number of tabulation characters, to apply to HTML tags. This indentation is also applied to thead.

tag.attrs

Named character vector specifying the list of attributes to be set to the <table> element. Setting this to NULL or an empty character vector disables attributes.

thead

character vector storing a table header to include. This can, for example, be a character that defines column widths. Every element in this vector is written on a separate line, applying the indentation given by indent.

tcaption

Text to include as a caption below the table, or NULL if the table does not contain caption.

na

character to be used for printing NA values in the table. This parameter is not considered when printing thead or the table's column names.

Value

The modified report, invisibly.

Author(s)

Yassen Assenov

See Also

rnb.add.tables for adding a listing of tables; Report for other functions adding contents to an HTML report


RnBeads documentation built on March 3, 2021, 2 a.m.