% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/flextable_sizes.R
\name{width}
\alias{width}
\title{Set columns width}
\usage{
width(x, j = NULL, width, unit = "in")
}
\arguments{
\item{x}{a \code{\link[=flextable]{flextable()}} object}

\item{j}{columns selection}

\item{width}{width in inches}

\item{unit}{unit for width, one of "in", "cm", "mm".}
}
\description{
Defines the widths of one or more columns in the
table. This function will have no effect if you have
used \code{set_table_properties(layout = "autofit")}.

\code{\link[=set_table_properties]{set_table_properties()}} can provide an alternative to fixed-width layouts
that is supported with HTML and Word output that can be set
with \code{set_table_properties(layout = "autofit")}.
}
\details{
Heights are not used when flextable is been rendered into HTML.
}
\section{Illustrations}{


\if{html}{\figure{fig_width_1.png}{options: width="400"}}
}

\examples{

ft <- flextable(head(iris))
ft <- width(ft, width = 1.5)
ft
}
\seealso{
Other flextable dimensions: 
\code{\link{autofit}()},
\code{\link{dim.flextable}()},
\code{\link{dim_pretty}()},
\code{\link{fit_to_width}()},
\code{\link{flextable_dim}()},
\code{\link{height}()},
\code{\link{hrule}()},
\code{\link{ncol_keys}()},
\code{\link{nrow_part}()},
\code{\link{set_table_properties}()}
}
\concept{flextable dimensions}
