The alignment may be tricky and this function therefore simplifies this process by extending/shortening the alignment to match the correct number of columns.
prPrepareAlign(align, x, rnames, default_rn = "l")
A character strings specifying column alignments, defaulting to
paste(rep('c',ncol(x)),collapse='')
to center. Valid alignments are
l = left, c = center and r = right. You can also specify align='c|c'
and
other LaTeX tabular formatting. If you want to set the alignment of the
rownames this string needst to be ncol(x) + 1
, otherwise it automatically
pads the string with a left alignment for the rownames.
The matrix/data.frame with the data. For the print
and knit_print
it takes a string of the class htmlTable
as x
argument.
The default rowname alignment. This is an option as the header uses the same function and there may be differences in how the alignments should be implemented.
Other hidden helper functions for htmlTable
: prAddCells
,
prAddSemicolon2StrEnd
,
prEscapeHtml
,
prGetCgroupHeader
,
prGetRowlabelPos
, prGetStyle
,
prPrepareCgroup
, prTblNo