blob: c65aede8b4d2c9d60071484e490af87fb6c44bd5 [file] [log] [blame]
Hao Zhu79f1e2a2017-06-11 20:55:30 -04001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/row_spec.R
3\name{row_spec}
4\alias{row_spec}
5\title{Specify the look of the selected row}
6\usage{
Hao Zhu3e53e602017-07-26 12:40:57 -04007row_spec(kable_input, row, bold = FALSE, italic = FALSE,
Hao Zhu76f0eb62018-09-15 12:38:33 -04008 monospace = FALSE, underline = FALSE, strikeout = FALSE,
9 color = NULL, background = NULL, align = NULL, font_size = NULL,
10 angle = NULL, extra_css = NULL, hline_after = FALSE,
11 extra_latex_after = NULL)
Hao Zhu79f1e2a2017-06-11 20:55:30 -040012}
13\arguments{
Hao Zhu76281fe2017-07-03 19:33:09 -040014\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
Hao Zhu79f1e2a2017-06-11 20:55:30 -040015
Hao Zhu322de082017-09-11 19:25:29 -040016\item{row}{A numeric value or vector indicating which row(s) to be selected. You don't
Hao Zhu2a87e8e2017-06-14 15:49:33 -040017need to count in header rows or group labeling rows.}
Hao Zhu79f1e2a2017-06-11 20:55:30 -040018
19\item{bold}{A T/F value to control whether the text of the selected row
20need to be bolded.}
21
22\item{italic}{A T/F value to control whether the text of the selected row
23need to be emphasized.}
Hao Zhu3e53e602017-07-26 12:40:57 -040024
Hao Zhu53454f02018-01-14 16:29:10 -050025\item{monospace}{A T/F value to control whether the text of the selected row
Hao Zhu3e53e602017-07-26 12:40:57 -040026need to be monospaced (verbatim)}
Hao Zhu53e240f2017-09-04 20:04:29 -040027
Hao Zhu53454f02018-01-14 16:29:10 -050028\item{underline}{A T/F value to control whether the text of the selected row
29need to be underlined}
30
31\item{strikeout}{A T/F value to control whether the text of the selected row
32need to be stricked out.}
33
Hao Zhu457acb42017-10-14 17:37:02 -040034\item{color}{A character string for row text color. For example, "red" or
35"#BBBBBB".}
Hao Zhu53e240f2017-09-04 20:04:29 -040036
Hao Zhue7c8f702017-10-10 13:22:59 -040037\item{background}{A character string for row background color. Here please
Hao Zhu53e240f2017-09-04 20:04:29 -040038pay attention to the differences in color codes between HTML and LaTeX.}
Hao Zhue7c8f702017-10-10 13:22:59 -040039
40\item{align}{A character string for cell alignment. For HTML, possible values could
41be \code{l}, \code{c}, \code{r} plus \code{left}, \code{center}, \code{right}, \code{justify}, \code{initial} and \code{inherit}
42while for LaTeX, you can only choose from \code{l}, \code{c} & \code{r}.}
43
Hao Zhu8b32b192017-10-24 14:51:48 -040044\item{font_size}{A numeric input for font size. For HTML, you can also use
45options including \code{xx-small}, \code{x-small}, \code{small}, \code{medium}, \code{large},
46\code{x-large}, \code{xx-large}, \code{smaller}, \code{larger}, \code{initial} and \code{inherit}.}
Hao Zhubacd2f32017-10-11 14:06:36 -040047
48\item{angle}{0-360, degree that the text will rotate.}
Hao Zhub1de9672018-01-08 16:29:24 -050049
50\item{extra_css}{Extra css text to be passed into the cells of the row. Note
51that it's not for the whole row.}
Hao Zhu53454f02018-01-14 16:29:10 -050052
53\item{hline_after}{T/F. A replicate of \code{hline.after} in xtable. It
54addes a hline after ther row}
55
56\item{extra_latex_after}{Extra LaTeX text to be added after the row. Similar
57with \code{add.to.row} in xtable}
Hao Zhu79f1e2a2017-06-11 20:55:30 -040058}
59\description{
60This function allows users to select a row and then specify
Hao Zhue7c8f702017-10-10 13:22:59 -040061its look. It can also specify the format of the header row when \code{row} = 0.
Hao Zhu79f1e2a2017-06-11 20:55:30 -040062}
63\examples{
64x <- knitr::kable(head(mtcars), "html")
Hao Zhu4840bc92017-09-15 15:55:05 -040065row_spec(x, 1:2, bold = TRUE, italic = TRUE)
Hao Zhu79f1e2a2017-06-11 20:55:30 -040066
67}