huxtable (version 4.4.0)

set-multiple: Set left, right, top and bottom properties

Description

These are convenience functions which set left, right, top and bottom properties simultaneously for the specified cells.

Usage

set_all_borders(ht, row, col, value, byrow = FALSE)

map_all_borders(ht, row, col, fn)

set_all_border_colors(ht, row, col, value, byrow = FALSE)

map_all_border_colors(ht, row, col, fn)

set_all_border_styles(ht, row, col, value, byrow = FALSE)

map_all_border_styles(ht, row, col, fn)

set_all_padding(ht, row, col, value, byrow = FALSE)

map_all_padding(ht, row, col, fn)

Arguments

ht

A huxtable.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

value

Value(s) to set. Set to NA to reset to the default.

byrow

Deprecated. Use by_cols() instead.

fn

A mapping function. See mapping-functions for details.

Value

The modified huxtable.

Examples

Run this code
# NOT RUN {
ht <- huxtable(a = 1:3, b = 1:3)
set_all_borders(ht, 1:3, 1:2, 1)
ht <- set_all_border_colors(ht, "red")
ht <- set_all_border_styles(ht, "double")
ht <- set_all_padding(ht, 1:3, 1:2, "20px")
# }

Run the code above in your browser using DataCamp Workspace