% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/htmlTable_helpers_prepareCgroup.R
\name{prPrepareCgroup}
\alias{prPrepareCgroup}
\title{Prepares the cgroup argument}
\usage{
prPrepareCgroup(x, cgroup = NULL, n.cgroup = NULL, style_list)
}
\arguments{
\item{x}{The matrix/data.frame with the data. For the \code{print} and \code{knit_print}
it takes a string of the class \code{htmlTable} as \code{x} argument.}

\item{cgroup}{A vector, matrix or list of character strings defining major column header. The default
is to have none. These elements are also known as \emph{column spanners}. If you want a column \emph{not}
to have a spanner then put that column as "". If you pass cgroup and \code{n.crgroup} as
matrices you can have column spanners for several rows. See cgroup section below for details.}

\item{n.cgroup}{An integer vector, matrix or list containing the number of columns for which each element in
cgroup is a heading. For example, specify \code{cgroup=c("Major_1","Major_2")},
\code{n.cgroup=c(3,3)} if \code{"Major_1"} is to span columns 1-3 and
\code{"Major_2"} is to span columns 4-6.
\code{rowlabel} does not count in the column numbers. You can omit \code{n.cgroup}
if all groups have the same number of columns. If the \code{n.cgroup} is one less than
the number of columns in the matrix/data.frame then it automatically adds those.}
}
\value{
\code{list(cgroup, n.cgroup, align.cgroup, cgroup_spacer_cells)}
}
\description{
Due to the complicated structure of multilevel cgroups there
some preparation for the cgroup options is required.
}
\seealso{
Other hidden helper functions for htmlTable: 
\code{\link{prAddCells}()},
\code{\link{prAddEmptySpacerCell}()},
\code{\link{prAddSemicolon2StrEnd}()},
\code{\link{prEscapeHtml}()},
\code{\link{prGetCgroupHeader}()},
\code{\link{prGetRowlabelPos}()},
\code{\link{prGetStyle}()},
\code{\link{prPrepInputMatrixDimensions}()},
\code{\link{prPrepareAlign}()},
\code{\link{prTblNo}()}
}
\concept{hidden helper functions for htmlTable}
\keyword{internal}
