table2html: Convert Data Frame to HTML file

table2htmlR Documentation

Convert Data Frame to HTML file

Description

Convert any data frame into a HTML file, augmented with hyperlinks to arbitrary content.

Usage

table2html(x, fileout, title = "", maxRows = NULL, extraHTMLtextFile = NULL, 
		linkColumnNames = "GENE_ID", linkPaths = ".", linkExtensions = ".png",
		linkTargetColumnNames=linkColumnNames)

Arguments

x

a data frame to be turned to HTML

fileout

the full pathname to the newly created HTML file

title

the title for the HTML document. May contain hypertext markup.

maxRows

the maximum number of rows of x to include in the resulting file.

extraHTMLtextFile

an optional text file on content, prepended to the HTML file prior to the table

linkColumnNames

character vector of table column names, that will be converted to hyperlinks. By default the content of the cell is both the base filename of the created hyperlink and the text displayed in the cell.

linkPaths

character vector of pathname prefixes that become part of the hyperlink anchor tag

linkExtensions

character vector of pathname suffixes that becomre part of the hyperlink anchor tag

linkTargetColumnNames

optional character vector of table column names, that allow the hyperlink for a cell to be built from text other than what is displayed in the cell. Most often used to make GeneID plot hyperlinks for columns that are not gene identifiers.

Details

This function is used to turn trancript and DE files into clickable HTML with links to gene plots. Care should be taken to assure that any target plots have the corrent filenames and path locations, to properly match the above link... arguments. It is sometimes advisable to edit the column names and formatting of x before turning it to HTML to improve the final appearance in the browser window.

Value

A file of HTML is written to disk.

Author(s)

Bob Morrison

References

uses much of the original CGIwithR routines by David Firth.


robertdouglasmorrison/DuffyTools documentation built on Sept. 13, 2024, 4:51 p.m.