Emboldens rows matching an expression, with optionally selected columns. For
use with knitr::kable()
.
knitr_bold_row(x, ..., cols = NULL, format = c("markdown", "html", "latex"))
x | A data frame |
---|---|
... | The filter expressions |
cols | Columns that should be emphasized, default |
format | One of |
#> # A tibble: 4 x 5 #> name height mass hair_color skin_color #> <chr> <chr> <chr> <chr> <chr> #> 1 Luke Skywalker 172 77 blond fair #> 2 C-3PO 167 75 <NA> gold #> 3 **R2-D2** **96** **32** <NA> **white, blue** #> 4 Darth Vader 202 136 none white#> # A tibble: 4 x 5 #> name height mass hair_color skin_color #> <chr> <chr> <dbl> <chr> <chr> #> 1 Luke Skywalker 172 77 blond fair #> 2 <strong>C-3PO</strong> <strong>167</strong> 75 <NA> gold #> 3 <strong>R2-D2</strong> <strong> 96</strong> 32 <NA> white, blue #> 4 Darth Vader 202 136 none white#> #> #> |name | height| mass|hair_color |skin_color | #> |:--------------|------:|----:|:----------|:-----------| #> |Luke Skywalker | 172| 77|**blond** |fair | #> |C-3PO | 167| 75|NA |gold | #> |R2-D2 | 96| 32|NA |white, blue | #> |Darth Vader | 202| 136|**none** |white |