This function retrieves a header row, i.e. a row
within the <th>
elements on top of the table. Used by
htmlTable()
.
prGetCgroupHeader(
x,
cgroup_vec,
n.cgroup_vec,
cgroup_vec.just,
row_no,
top_row_style,
rnames,
rowlabel = NULL,
cgroup_spacer_cells,
style_list,
prepped_cell_css,
css_4_cgroup_vec
)
string
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 cgroup
may be a matrix
, this is
just one row of that matrix
The same as above but for the counter
The same as above bot for the justification
The row number within the header group. Useful for multi-row
headers when we need to output the rowlabel
at the pos.rowlabel
level.
The top row has a special style depending on
the ctable
option in the htmlTable
call.
Default row names are generated from rownames(x)
. If you
provide FALSE
then it will skip the row names. Note: For data.frames
if you do rownames(my_dataframe) <- NULL
it still has
row names. Thus you need to use FALSE
if you want to
supress row names for data.frames
.
If the table has row names or rnames
,
rowlabel
is a character string containing the
column heading for the rnames
.
The spacer cells due to the multiple cgroup levels.
With multiple rows in cgroup we need to keep track of how many spacer cells
occur between the columns. This variable contains is of the size ncol(x)-1
and 0 if there is no cgroup element between.
The list with all the styles
Other hidden helper functions for htmlTable:
prAddCells()
,
prAddEmptySpacerCell()
,
prAddSemicolon2StrEnd()
,
prEscapeHtml()
,
prGetRowlabelPos()
,
prGetStyle()
,
prPrepInputMatrixDimensions()
,
prPrepareAlign()
,
prPrepareCgroup()
,
prTblNo()