Usage
prGetCgroupHeader(x, cgroup_vec, n.cgroup_vec, cgroup_vec.just, css.cgroup_vec, row_no, top_row_style, rnames, rowlabel, pos.rowlabel, cgroup_spacer_cells, css.cell)
Arguments
x
The matrix/data.frame with the data. For the print
and knit_print
it takes a string of the class htmlTable
as x
argument.
cgroup_vec
The cgroup may be a matrix, this is
just one row of that matrix
n.cgroup_vec
The same as above but for the counter
cgroup_vec.just
The same as above bot for the justificaiton
css.cgroup_vec
The CSS row corresponding to the current row
row_no
The row number within the header group. Useful for multirow
headers when we need to output the rowlabel at the pos.rowlabel
level.
top_row_style
The top row has a special style depending on
the ctable
option in the htmlTable
call.
rnames
Default rownames are generated from rownames(x)
. If you
provide FALSE
then it will skip the rownames. Note: For data.frames
if you do rownames(my_dataframe) <- NULL
it still has
rownames. Thus you need to use FALSE
if you want to
surpress rownames for data.frames
. rowlabel
If the table has rownames or rnames
,
rowlabel is a character string containing the
column heading for the rnames
.
pos.rowlabel
Where the rowlabel should be positioned. This value can be "top"
,
"bottom"
, "header"
, or a integer between 1
and nrow(cgroup) + 1
. The options
"bottom"
and "header"
are the same, where the row label is presented at the same level as
the header.
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)-1
and 0 if there is no cgroup element between.
css.cell
The css.cell element allows you to add any possible CSS style to your
table cells. If you provide a vector the vector it is assummed that the styles should
be repeated throughout the columns. If you provide a matrix of the same size as your
x
argument. If have ncol(x) + 1
the first row will correspond to the
rowname style. Correspondingly if the size is nrow(x) + 1
it is assummed that the
first row is the header row.