Skip to contents

Adds a row highlight rule to an object that will later be rendered with htmlTable(). The condition is evaluated against the table columns and a .rowname variable containing the row names.

Usage

highlightRow(x, condition, style = "warning")

Arguments

x

A matrix or data.frame that will later be passed to htmlTable().

condition

A logical expression or logical vector used to select rows.

style

The CSS style to apply to matched rows.

Value

x with a row highlight rule stored in its htmlTable.style attribute.

Details

The style argument accepts:

  • a preset name such as "warning", "info", "success", or "muted"

  • a bare color value, which becomes background-color: ...

  • raw CSS fragments, including named vectors such as c(color = "white")

See also