Hao Zhu | bff0191 | 2017-05-23 18:05:00 -0400 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/column_spec.R |
| 3 | \name{column_spec} |
| 4 | \alias{column_spec} |
| 5 | \title{Specify the look of the selected column} |
| 6 | \usage{ |
Hao Zhu | 78e6122 | 2017-05-24 20:53:35 -0400 | [diff] [blame] | 7 | column_spec(kable_input, column, width = NULL, bold = FALSE, |
Hao Zhu | ec7ab92 | 2017-08-19 22:56:44 -0400 | [diff] [blame] | 8 | italic = FALSE, monospace = FALSE, color = NULL, background = NULL, |
Hao Zhu | 322de08 | 2017-09-11 19:25:29 -0400 | [diff] [blame] | 9 | border_left = FALSE, border_right = FALSE, ...) |
Hao Zhu | bff0191 | 2017-05-23 18:05:00 -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 | bff0191 | 2017-05-23 18:05:00 -0400 | [diff] [blame] | 13 | |
Hao Zhu | 322de08 | 2017-09-11 19:25:29 -0400 | [diff] [blame] | 14 | \item{column}{A numeric value or vector indicating which column(s) to be selected.} |
Hao Zhu | bff0191 | 2017-05-23 18:05:00 -0400 | [diff] [blame] | 15 | |
| 16 | \item{width}{A character string telling HTML & LaTeX how wide the column |
| 17 | needs to be, e.g. "10cm", "3in" or "30em".} |
| 18 | |
| 19 | \item{bold}{A T/F value to control whether the text of the selected column |
| 20 | need to be bolded.} |
| 21 | |
| 22 | \item{italic}{A T/F value to control whether the text of the selected column |
| 23 | need to be emphasized.} |
Hao Zhu | 8f20299 | 2017-07-15 02:20:18 -0400 | [diff] [blame] | 24 | |
| 25 | \item{monospace}{A T/F value to control whether the text of the selected column |
| 26 | need to be monospaced (verbatim)} |
Hao Zhu | ec7ab92 | 2017-08-19 22:56:44 -0400 | [diff] [blame] | 27 | |
Hao Zhu | 53e240f | 2017-09-04 20:04:29 -0400 | [diff] [blame] | 28 | \item{color}{A character string for column text color. Here please pay |
| 29 | attention to the differences in color codes between HTML and LaTeX.} |
Hao Zhu | ec7ab92 | 2017-08-19 22:56:44 -0400 | [diff] [blame] | 30 | |
Hao Zhu | 53e240f | 2017-09-04 20:04:29 -0400 | [diff] [blame] | 31 | \item{background}{A character string for column background color. Here please |
| 32 | pay attention to the differences in color codes between HTML and LaTeX.} |
| 33 | |
| 34 | \item{border_left}{A logical variable indicating whether there should be a |
| 35 | border line on the left of the selected column. In HTML, you can also pass |
| 36 | in a character string for the CSS of the border line} |
| 37 | |
| 38 | \item{border_right}{A logical variable indicating whether there should be a |
| 39 | border line on the right of the selected column. In HTML, you can also pass |
| 40 | in a character string for the CSS of the border line} |
Hao Zhu | bff0191 | 2017-05-23 18:05:00 -0400 | [diff] [blame] | 41 | } |
| 42 | \description{ |
| 43 | This function allows users to select a column and then specify |
| 44 | its look. Right now it supports the following three properties: column width, |
| 45 | bold text and italic text. |
| 46 | } |
Hao Zhu | 78e6122 | 2017-05-24 20:53:35 -0400 | [diff] [blame] | 47 | \examples{ |
| 48 | x <- knitr::kable(head(mtcars), "html") |
| 49 | column_spec(x, 1, width = "20em", bold = TRUE, italic = TRUE) |
| 50 | |
| 51 | } |