File: width.Rd

package info (click to toggle)
r-cran-flextable 0.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,264 kB
  • sloc: sh: 15; makefile: 2
file content (55 lines) | stat: -rw-r--r-- 1,374 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% 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}