Learn R Programming

metaseqR (version 1.12.2)

make.html.table: HTML report helper

Description

Returns a character vector with a fully html formatted table. Essentially, it binds the outputs of make.html.cells, make.html.rows, make.html.header and make.html.body to the final table and optionally assigns an id attribute. The above functions are meant to format a data table so as it can be rendered by external tools such as DataTables.js during a report creation. It is meant for internal use.

Usage

make.html.table(b, h = NULL, id = NULL)

Arguments

b
the table body as produced by make.html.body.
h
the table header as produced by make.html.header.
id
the table id attribute.

Value

  • A fully formatted html table.

Examples

Run this code
data.matrix <- round(1000*matrix(runif(400),100,4))
rownames(data.matrix) <- paste("gene_",1:100,sep="")
colnames(data.matrix) <- c("C1","C2","T1","T2")
the.cells <- make.html.cells(data.matrix)
the.header <- make.html.header(the.cells[1,])
the.rows <- make.html.rows(the.cells)
the.body <- make.html.body(the.rows)
the.table <- make.html.table(the.body,the.header,id="my_table")

Run the code above in your browser using DataLab