Hao Zhu | 79f1e2a | 2017-06-11 20:55:30 -0400 | [diff] [blame] | 1 | % 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 Zhu | 3e53e60 | 2017-07-26 12:40:57 -0400 | [diff] [blame] | 7 | row_spec(kable_input, row, bold = FALSE, italic = FALSE, |
Hao Zhu | e7c8f70 | 2017-10-10 13:22:59 -0400 | [diff] [blame] | 8 | monospace = FALSE, color = NULL, background = NULL, align = NULL, |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 9 | font_size = NULL, angle = NULL) |
Hao Zhu | 79f1e2a | 2017-06-11 20:55:30 -0400 | [diff] [blame] | 10 | } |
| 11 | \arguments{ |
Hao Zhu | 76281fe | 2017-07-03 19:33:09 -0400 | [diff] [blame] | 12 | \item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified} |
Hao Zhu | 79f1e2a | 2017-06-11 20:55:30 -0400 | [diff] [blame] | 13 | |
Hao Zhu | 322de08 | 2017-09-11 19:25:29 -0400 | [diff] [blame] | 14 | \item{row}{A numeric value or vector indicating which row(s) to be selected. You don't |
Hao Zhu | 2a87e8e | 2017-06-14 15:49:33 -0400 | [diff] [blame] | 15 | need to count in header rows or group labeling rows.} |
Hao Zhu | 79f1e2a | 2017-06-11 20:55:30 -0400 | [diff] [blame] | 16 | |
| 17 | \item{bold}{A T/F value to control whether the text of the selected row |
| 18 | need to be bolded.} |
| 19 | |
| 20 | \item{italic}{A T/F value to control whether the text of the selected row |
| 21 | need to be emphasized.} |
Hao Zhu | 3e53e60 | 2017-07-26 12:40:57 -0400 | [diff] [blame] | 22 | |
| 23 | \item{monospace}{A T/F value to control whether the text of the selected column |
| 24 | need to be monospaced (verbatim)} |
Hao Zhu | 53e240f | 2017-09-04 20:04:29 -0400 | [diff] [blame] | 25 | |
Hao Zhu | 457acb4 | 2017-10-14 17:37:02 -0400 | [diff] [blame^] | 26 | \item{color}{A character string for row text color. For example, "red" or |
| 27 | "#BBBBBB".} |
Hao Zhu | 53e240f | 2017-09-04 20:04:29 -0400 | [diff] [blame] | 28 | |
Hao Zhu | e7c8f70 | 2017-10-10 13:22:59 -0400 | [diff] [blame] | 29 | \item{background}{A character string for row background color. Here please |
Hao Zhu | 53e240f | 2017-09-04 20:04:29 -0400 | [diff] [blame] | 30 | pay attention to the differences in color codes between HTML and LaTeX.} |
Hao Zhu | e7c8f70 | 2017-10-10 13:22:59 -0400 | [diff] [blame] | 31 | |
| 32 | \item{align}{A character string for cell alignment. For HTML, possible values could |
| 33 | be \code{l}, \code{c}, \code{r} plus \code{left}, \code{center}, \code{right}, \code{justify}, \code{initial} and \code{inherit} |
| 34 | while for LaTeX, you can only choose from \code{l}, \code{c} & \code{r}.} |
| 35 | |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 36 | \item{font_size}{Only if you want to specify font size locally in HTML. |
| 37 | This feature is not available in LaTeX} |
| 38 | |
| 39 | \item{angle}{0-360, degree that the text will rotate.} |
Hao Zhu | 79f1e2a | 2017-06-11 20:55:30 -0400 | [diff] [blame] | 40 | } |
| 41 | \description{ |
| 42 | This function allows users to select a row and then specify |
Hao Zhu | e7c8f70 | 2017-10-10 13:22:59 -0400 | [diff] [blame] | 43 | its look. It can also specify the format of the header row when \code{row} = 0. |
Hao Zhu | 79f1e2a | 2017-06-11 20:55:30 -0400 | [diff] [blame] | 44 | } |
| 45 | \examples{ |
| 46 | x <- knitr::kable(head(mtcars), "html") |
Hao Zhu | 4840bc9 | 2017-09-15 15:55:05 -0400 | [diff] [blame] | 47 | row_spec(x, 1:2, bold = TRUE, italic = TRUE) |
Hao Zhu | 79f1e2a | 2017-06-11 20:55:30 -0400 | [diff] [blame] | 48 | |
| 49 | } |