blob: 9b24b0119f6a5309096c206493af364d72cb2eb0 [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 Zhu8f202992017-07-15 02:20:18 -04008 italic = FALSE, monospace = FALSE)
Hao Zhubff01912017-05-23 18:05:00 -04009}
10\arguments{
Hao Zhu76281fe2017-07-03 19:33:09 -040011\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
Hao Zhubff01912017-05-23 18:05:00 -040012
Hao Zhubf5bfe22017-06-21 14:37:41 -040013\item{column}{A numeric value indicating which column to be selected. When
14you do the counting, ignore the extra header columns you added through
15add_header_left.}
Hao Zhubff01912017-05-23 18:05:00 -040016
17\item{width}{A character string telling HTML & LaTeX how wide the column
18needs to be, e.g. "10cm", "3in" or "30em".}
19
20\item{bold}{A T/F value to control whether the text of the selected column
21need to be bolded.}
22
23\item{italic}{A T/F value to control whether the text of the selected column
24need to be emphasized.}
Hao Zhu8f202992017-07-15 02:20:18 -040025
26\item{monospace}{A T/F value to control whether the text of the selected column
27need to be monospaced (verbatim)}
Hao Zhubff01912017-05-23 18:05:00 -040028}
29\description{
30This function allows users to select a column and then specify
31its look. Right now it supports the following three properties: column width,
32bold text and italic text.
33}
Hao Zhu78e61222017-05-24 20:53:35 -040034\examples{
35x <- knitr::kable(head(mtcars), "html")
36column_spec(x, 1, width = "20em", bold = TRUE, italic = TRUE)
37
38}