- Documentation
For more complete explanations and examples please see
the extensive vignettes supplied with this package.
new(argumentCheckMode="auto", theme=NULL,
replaceExistingStyles=FALSE, tableStyle=NULL, headingStyle=NULL,
cellStyle=NULL, totalStyle=NULL, compatibility=NULL, traceEnabled=FALSE,
traceFile=NULL)
Create a new table, optionally specifying the name of a
built in theme or CSS style declarations for the different cells within the
table.
addData(dataFrame=NULL, columnNamesAsColumnHeaders=TRUE,
explicitColumnHeaders=NULL, rowNamesAsRowHeaders=FALSE,
firstColumnAsRowHeaders=FALSE, explicitRowHeaders=NULL, columnFormats=NULL,
baseStyleNames=NULL)
Generate the table from a data frame, specifying
headers and value formatting.
addMatrix(matrix=NULL, columnNamesAsColumnHeaders=TRUE,
explicitColumnHeaders=NULL, rowNamesAsRowHeaders=FALSE,
explicitRowHeaders=NULL, columnFormats=NULL,
baseStyleNames=NULL)
Generate the table from a matrix, specifying headers
and value formatting.l
mergeCells(rFrom, cFrom, rSpan=NULL, cSpan=NULL,
rTo=NULL, cTo=NULL)
Merge cells in the table. This does not delete
the other cells covered by the merged cell. When the table is output, the
top-left most cell in the merged cell range is rendered over the other
cells (which are effectively hidden).
unmergeCells(r, c, errorIfNotFound=TRUE)
Delete a merged cell
range by specifying any of the cells covered by the merged cell.
applyCellMerges()
Updates the isMerged, isMergeRoot and
mergeIndex properties of the cells.
formatValue(value=NULL, format=NULL)
Format a value for
display, using either sprintf(), format() or a custom formatting function.
addStyle(styleName, declarations)
Define a new TableStyle and
add it to the TableStyles collection.
createInlineStyle(baseStyleName, declarations)
Create a
TableStyle object that can be used to style individual cells in the table.
setStyling(rFrom=NULL, cFrom=NULL, rTo=NULL, cTo=NULL,
cells=NULL, baseStyleName=NULL, style=NULL, declarations=NULL)
Set the
style settings across a range of cells.
resetCells()
Clear the cells of the table.
getCells(specifyCellsAsList=TRUE, rowNumbers=NULL,
columnNumbers=NULL, cellCoordinates=NULL)
Retrieve cells by a combination
of row and/or column numbers.
findCells(rowNumbers=NULL, columnNumbers=NULL,
minValue=NULL, maxValue=NULL, exactValues=NULL, includeNull=TRUE,
includeNA=TRUE)
Find cells in the body of the table matching
the specified criteria.
print(asCharacter=FALSE)
Either print the table to the
console or retrieve it as a character value.
asMatrix(firstRowAsColumnNames=FALSE,
firstColumnAsRowNames=FALSE, rawValue=FALSE)
Gets the table as
a matrix, with or without headings.
asDataFrame(firstRowAsColumnNames=FALSE,
firstColumnAsRowNames=FALSE, rawValue=FALSE, stringsAsFactors)
Gets the table as a data frame, with or without headings.
getCss(styleNamePrefix)
Get the CSS declarations for the
entire table.
getHtml(styleNamePrefix)
Get the HTML representation of the
table, specifying the CSS style name prefix to use.
saveHtml(filePath, fullPageHTML=TRUE, styleNamePrefix)
Save
the HTML representation of the table to a file.
renderTable(width, height, styleNamePrefix)
Render the table
as a htmlwidget.
writeToExcelWorksheet(wb=NULL, wsName=NULL, topRowNumber=NULL,
leftMostColumnNumber=NULL, mapStylesFromCSS=TRUE)
Output the table
into the specified workbook and worksheet at the specified row-column
location.
asList()
Get a list representation of the table.
asJSON()
Get a JSON representation of the table.
viewJSON()
View the JSON representation of the table.