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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/borders.R
\name{border}
\alias{border}
\title{cell borders update}
\usage{
border(
x,
i = NULL,
j = NULL,
border = NULL,
border.top = NULL,
border.bottom = NULL,
border.left = NULL,
border.right = NULL,
part = "body"
)
}
\arguments{
\item{x}{a flextable object}
\item{i}{rows selection}
\item{j}{columns selection}
\item{border}{border (shortcut for top, bottom, left and right)}
\item{border.top}{border top}
\item{border.bottom}{border bottom}
\item{border.left}{border left}
\item{border.right}{border right}
\item{part}{partname of the table (one of 'all', 'body', 'header', 'footer')}
}
\description{
change borders of selected rows and columns of a flextable.
This function is not to be used by end user (it requires careful
settings to avoid overlapping borders) but only for programming purposes.
If you need to add borders, use instead other functions:
These set borders for the whole table : \code{\link[=border_outer]{border_outer()}},
\code{\link[=border_inner_h]{border_inner_h()}} and \code{\link[=border_inner_v]{border_inner_v()}}.
To add horizontal or vertical lines in the table at specific location,
use:
\itemize{
\item \code{\link[=hline]{hline()}}: set bottom borders (inner horizontal)
\item \code{\link[=vline]{vline()}}: set right borders (inner vertical)
}
To add following horizontal or vertical lines at
beginning or end of the table, use:
\itemize{
\item \code{\link[=hline_top]{hline_top()}}: set the top border (outer horizontal)
\item \code{\link[=hline_bottom]{hline_bottom()}}: set the bottom border (outer horizontal)
\item \code{\link[=vline_left]{vline_left()}}: set the left border (outer vertical)
\item \code{\link[=vline_right]{vline_right()}}: set the right border (outer vertical)
}
If you want to highlight specific cells with some borders, use
\code{\link[=surround]{surround()}}.
}
\note{
pdf and pptx outputs do not support \code{border()} usage.
}
\examples{
library(officer)
ftab <- flextable(head(mtcars))
ftab <- border(ftab, border.top = fp_border(color = "orange") )
ftab
}
\keyword{internal}
|