blob: 0338b139158101d66674f6fcfb923f81fbbf8a0e [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 Zhue7c8f702017-10-10 13:22:59 -04008 monospace = FALSE, color = NULL, background = NULL, align = NULL,
Hao Zhub1de9672018-01-08 16:29:24 -05009 font_size = NULL, angle = NULL, extra_css)
Hao Zhu79f1e2a2017-06-11 20:55:30 -040010}
11\arguments{
Hao Zhu76281fe2017-07-03 19:33:09 -040012\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
Hao Zhu79f1e2a2017-06-11 20:55:30 -040013
Hao Zhu322de082017-09-11 19:25:29 -040014\item{row}{A numeric value or vector indicating which row(s) to be selected. You don't
Hao Zhu2a87e8e2017-06-14 15:49:33 -040015need to count in header rows or group labeling rows.}
Hao Zhu79f1e2a2017-06-11 20:55:30 -040016
17\item{bold}{A T/F value to control whether the text of the selected row
18need to be bolded.}
19
20\item{italic}{A T/F value to control whether the text of the selected row
21need to be emphasized.}
Hao Zhu3e53e602017-07-26 12:40:57 -040022
23\item{monospace}{A T/F value to control whether the text of the selected column
24need to be monospaced (verbatim)}
Hao Zhu53e240f2017-09-04 20:04:29 -040025
Hao Zhu457acb42017-10-14 17:37:02 -040026\item{color}{A character string for row text color. For example, "red" or
27"#BBBBBB".}
Hao Zhu53e240f2017-09-04 20:04:29 -040028
Hao Zhue7c8f702017-10-10 13:22:59 -040029\item{background}{A character string for row background color. Here please
Hao Zhu53e240f2017-09-04 20:04:29 -040030pay attention to the differences in color codes between HTML and LaTeX.}
Hao Zhue7c8f702017-10-10 13:22:59 -040031
32\item{align}{A character string for cell alignment. For HTML, possible values could
33be \code{l}, \code{c}, \code{r} plus \code{left}, \code{center}, \code{right}, \code{justify}, \code{initial} and \code{inherit}
34while for LaTeX, you can only choose from \code{l}, \code{c} & \code{r}.}
35
Hao Zhu8b32b192017-10-24 14:51:48 -040036\item{font_size}{A numeric input for font size. For HTML, you can also use
37options including \code{xx-small}, \code{x-small}, \code{small}, \code{medium}, \code{large},
38\code{x-large}, \code{xx-large}, \code{smaller}, \code{larger}, \code{initial} and \code{inherit}.}
Hao Zhubacd2f32017-10-11 14:06:36 -040039
40\item{angle}{0-360, degree that the text will rotate.}
Hao Zhub1de9672018-01-08 16:29:24 -050041
42\item{extra_css}{Extra css text to be passed into the cells of the row. Note
43that it's not for the whole row.}
Hao Zhu79f1e2a2017-06-11 20:55:30 -040044}
45\description{
46This function allows users to select a row and then specify
Hao Zhue7c8f702017-10-10 13:22:59 -040047its look. It can also specify the format of the header row when \code{row} = 0.
Hao Zhu79f1e2a2017-06-11 20:55:30 -040048}
49\examples{
50x <- knitr::kable(head(mtcars), "html")
Hao Zhu4840bc92017-09-15 15:55:05 -040051row_spec(x, 1:2, bold = TRUE, italic = TRUE)
Hao Zhu79f1e2a2017-06-11 20:55:30 -040052
53}