This function retrieves a header row, i.e. a row
within the <th> elements on top of the table. Used by
htmlTable().
Usage
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
)Arguments
- x
The matrix/data.frame with the data. For the
printandknit_printit takes a string of the classhtmlTableasxargument.- cgroup_vec
The
cgroupmay be amatrix, this is just one row of thatmatrix- n.cgroup_vec
The same as above but for the counter
- cgroup_vec.just
The same as above bot for the justification
- row_no
The row number within the header group. Useful for multi-row headers when we need to output the
rowlabelat thepos.rowlabellevel.- top_row_style
The top row has a special style depending on the
ctableoption in thehtmlTablecall.- rnames
Default row names are generated from
rownames(x). If you provideFALSEthen it will skip the row names. Note: Fordata.framesif you dorownames(my_dataframe) <- NULLit still has row names. Thus you need to useFALSEif you want to supress row names fordata.frames.- rowlabel
If the table has row names or
rnames,rowlabelis a character string containing the column heading for thernames.- cgroup_spacer_cells
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)-1and 0 if there is no cgroup element between.- style_list
The list with all the styles
See also
Other hidden helper functions for htmlTable:
prAddCells(),
prAddEmptySpacerCell(),
prAddSemicolon2StrEnd(),
prEscapeHtml(),
prGetRowlabelPos(),
prGetStyle(),
prPrepInputMatrixDimensions(),
prPrepareAlign(),
prPrepareCgroup(),
prTblNo()