% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/styles.R
\name{empty_blanks}
\alias{empty_blanks}
\title{Make blank columns transparent}
\usage{
empty_blanks(x, width = 0.05, unit = "in", part = "all")
}
\arguments{
\item{x}{a 'flextable' object, see \link{flextable-package} to learn how to create
'flextable' object.}

\item{width}{width of blank columns (.1 inch by default).}

\item{unit}{unit for width, one of "in", "cm", "mm".}

\item{part}{part selector, see section \emph{Part selection with the \code{part}
parameter} in <\code{\link[=flextable_selectors]{Selectors in flextable}}>.
Value 'all' can be used.}
}
\description{
Blank columns are set as transparent. This is a shortcut function
that deletes top and bottom borders, changes the background color to
transparent, displays empty content, and sets blank column widths.
}
\examples{
typology <- data.frame(
  col_keys = c(
    "Sepal.Length", "Sepal.Width", "Petal.Length",
    "Petal.Width", "Species"
  ),
  what = c("Sepal", "Sepal", "Petal", "Petal", " "),
  measure = c("Length", "Width", "Length", "Width", "Species"),
  stringsAsFactors = FALSE
)
typology

ftab <- flextable(head(iris), col_keys = c(
  "Species",
  "break1", "Sepal.Length", "Sepal.Width",
  "break2", "Petal.Length", "Petal.Width"
))
ftab <- set_header_df(ftab, mapping = typology, key = "col_keys")
ftab <- merge_h(ftab, part = "header")
ftab <- theme_vanilla(ftab)
ftab <- empty_blanks(ftab)
ftab <- width(ftab, j = c(2, 5), width = .1)
ftab
}
\seealso{
Other formatting shortcuts:
\code{\link[=align]{align()}},
\code{\link[=bg]{bg()}},
\code{\link[=bold]{bold()}},
\code{\link[=color]{color()}},
\code{\link[=font]{font()}},
\code{\link[=fontsize]{fontsize()}},
\code{\link[=highlight]{highlight()}},
\code{\link[=indentation]{indentation()}},
\code{\link[=italic]{italic()}},
\code{\link[=keep_with_next]{keep_with_next()}},
\code{\link[=line_spacing]{line_spacing()}},
\code{\link[=padding]{padding()}},
\code{\link[=rotate]{rotate()}},
\code{\link[=style]{style()}},
\code{\link[=tab_settings]{tab_settings()}},
\code{\link[=valign]{valign()}}
}
\concept{formatting_shortcuts}
