row_spec | R Documentation |
This function allows users to select a row and then specify
its look. It can also specify the format of the header row when row
= 0.
row_spec(
kable_input,
row,
bold = FALSE,
italic = FALSE,
monospace = FALSE,
underline = FALSE,
strikeout = FALSE,
color = NULL,
background = NULL,
align = NULL,
font_size = NULL,
angle = NULL,
extra_css = NULL,
hline_after = FALSE,
extra_latex_after = NULL
)
kable_input |
Output of |
row |
A numeric value or vector indicating which row(s) to be selected. You don't need to count in header rows or group labeling rows. |
bold |
A T/F value to control whether the text of the selected row need to be bolded. |
italic |
A T/F value to control whether the text of the selected row need to be emphasized. |
monospace |
A T/F value to control whether the text of the selected row need to be monospaced (verbatim) |
underline |
A T/F value to control whether the text of the selected row need to be underlined |
strikeout |
A T/F value to control whether the text of the selected row need to be struck out. |
color |
A character string for row text color. For example, "red" or "#BBBBBB". |
background |
A character string for row background color. Here please pay attention to the differences in color codes between HTML and LaTeX. |
align |
A character string for cell alignment. For HTML, possible values could
be |
font_size |
A numeric input for font size. For HTML, you can also use
options including |
angle |
0-360, degree that the text will rotate. |
extra_css |
Extra css text to be passed into the cells of the row. Note that it's not for the whole row. |
hline_after |
T/F. A replicate of |
extra_latex_after |
Extra LaTeX text to be added after the row. Similar
with |
## Not run:
x <- knitr::kable(head(mtcars), "html")
row_spec(x, 1:2, bold = TRUE, italic = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.