knitr_bold_row: Embolden rows matching an expression

Description Usage Arguments Examples

Description

Emboldens rows matching an expression, with optionally selected columns. For use with knitr::kable().

Usage

1
knitr_bold_row(x, ..., cols = NULL, format = c("markdown", "html", "latex"))

Arguments

x

A data frame

...

The filter expressions

cols

Columns that should be emphasized, default NULL or all columns

format

One of "markdown", "html", or "latex"

Examples

1
2
3
4
5
6
7
8
x <- dplyr::starwars[1:4, 1:5]
knitr_bold_row(x, height < 100)

knitr_bold_row(x, mass <= 75, height <= 170, cols = c("name", "height"), format = "html")

x %>%
  knitr_bold_row(height > 170, cols = "hair_color") %>%
  knitr::kable()

GerkeLab/grkmisc documentation built on Feb. 23, 2020, 6:50 a.m.