blob: ef7712ce2b978f4a5232c1d4268708ed868e309f [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 Zhubacd2f32017-10-11 14:06:36 -04009 font_size = NULL, angle = NULL)
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 Zhubacd2f32017-10-11 14:06:36 -040036\item{font_size}{Only if you want to specify font size locally in HTML.
37This feature is not available in LaTeX}
38
39\item{angle}{0-360, degree that the text will rotate.}
Hao Zhu79f1e2a2017-06-11 20:55:30 -040040}
41\description{
42This function allows users to select a row and then specify
Hao Zhue7c8f702017-10-10 13:22:59 -040043its look. It can also specify the format of the header row when \code{row} = 0.
Hao Zhu79f1e2a2017-06-11 20:55:30 -040044}
45\examples{
46x <- knitr::kable(head(mtcars), "html")
Hao Zhu4840bc92017-09-15 15:55:05 -040047row_spec(x, 1:2, bold = TRUE, italic = TRUE)
Hao Zhu79f1e2a2017-06-11 20:55:30 -040048
49}