% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/merge_flextable.R
\name{merge_h_range}
\alias{merge_h_range}
\title{Rowwise merge of a range of columns}
\usage{
merge_h_range(x, i = NULL, j1 = NULL, j2 = NULL, part = "body")
}
\arguments{
\item{x}{a 'flextable' object, see \link{flextable-package} to learn how to create
'flextable' object.}

\item{i}{row selector, see section \emph{Row selection with the \code{i} parameter}
in <\code{\link[=flextable_selectors]{Selectors in flextable}}>.}

\item{j1, j2}{selected columns that will define the range of columns to merge.}

\item{part}{part selector, see section \emph{Part selection with the \code{part}
parameter} in <\code{\link[=flextable_selectors]{Selectors in flextable}}>.
Value 'all' is not allowed by the function.}
}
\description{
Merge flextable columns into a single one for each selected rows. All
columns must be consecutive.
}
\examples{
ft <- flextable(head(mtcars), cwidth = .5)
ft <- theme_box(ft)
ft <- merge_h_range(ft, i = ~ cyl == 6, j1 = "am", j2 = "carb")
ft <- flextable::align(ft, i = ~ cyl == 6, align = "center")
ft
}
\seealso{
Other cell merging functions:
\code{\link[=merge_at]{merge_at()}},
\code{\link[=merge_h]{merge_h()}},
\code{\link[=merge_none]{merge_none()}},
\code{\link[=merge_v]{merge_v()}}
}
\concept{cell merging functions}
