blob: 81986e481a602edbc16e07fad393b81950b6b6dc [file] [log] [blame]
Hao Zhubff01912017-05-23 18:05:00 -04001% 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 Zhu78e61222017-05-24 20:53:35 -04007column_spec(kable_input, column, width = NULL, bold = FALSE,
Hao Zhuec7ab922017-08-19 22:56:44 -04008 italic = FALSE, monospace = FALSE, color = NULL, background = NULL,
9 border_left = FALSE, border_right = FALSE)
Hao Zhubff01912017-05-23 18:05:00 -040010}
11\arguments{
Hao Zhu76281fe2017-07-03 19:33:09 -040012\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
Hao Zhubff01912017-05-23 18:05:00 -040013
Hao Zhubf5bfe22017-06-21 14:37:41 -040014\item{column}{A numeric value indicating which column to be selected. When
15you do the counting, ignore the extra header columns you added through
16add_header_left.}
Hao Zhubff01912017-05-23 18:05:00 -040017
18\item{width}{A character string telling HTML & LaTeX how wide the column
19needs to be, e.g. "10cm", "3in" or "30em".}
20
21\item{bold}{A T/F value to control whether the text of the selected column
22need to be bolded.}
23
24\item{italic}{A T/F value to control whether the text of the selected column
25need to be emphasized.}
Hao Zhu8f202992017-07-15 02:20:18 -040026
27\item{monospace}{A T/F value to control whether the text of the selected column
28need to be monospaced (verbatim)}
Hao Zhuec7ab922017-08-19 22:56:44 -040029
30\item{color}{A character string for column text color.}
31
32\item{background}{A character string for column background color.}
Hao Zhubff01912017-05-23 18:05:00 -040033}
34\description{
35This function allows users to select a column and then specify
36its look. Right now it supports the following three properties: column width,
37bold text and italic text.
38}
Hao Zhu78e61222017-05-24 20:53:35 -040039\examples{
40x <- knitr::kable(head(mtcars), "html")
41column_spec(x, 1, width = "20em", bold = TRUE, italic = TRUE)
42
43}