rowspecs {huxtable}R Documentation

Row and column specifications

Description

Row and column specifications

The basics

The set_* functions for cell properties all have arguments like this: set_property(ht, row, col, value, byrow = FALSE).

You can treat row and col arguments like arguments for data frame subsetting. But there are a few extra tricks:

[=[.data.frame]: R:=[.data.frame

The gory details

How the row and col arguments are parsed depends on the number of arguments passed to the set_* function.

Examples

ht <- huxtable(a = 1:5, b = 5:1)

set_bold(ht, 2:4, 1:2, TRUE)
set_bold(ht, odds, evens, TRUE)
set_bold(ht, everywhere, tidyselect::matches('[aeiou]'), TRUE)

set_bold(ht, where(ht == 1), TRUE)

set_text_color(ht, 2:3, 1:2, c('red', 'blue'))
set_text_color(ht, 2:3, 1:2, c('red', 'blue'), byrow = TRUE)

[Package huxtable version 4.0.0 Index]