grp_replace: Replace one or more *gt* tables in a 'gt_group' container...

View source: R/gt_group.R

grp_replaceR Documentation

Replace one or more gt tables in a gt_group container object

Description

The gt_group() function can be used to create a container for multiple gt tables. In some circumstances, you might want to replace a specific gt_tbl object (or multiple) with a different one. This can be done with the grp_replace() function. The important thing is that the number of gt tables provided must equal the number of indices for tables present in the gt_group object.

Usage

grp_replace(.data, ..., .list = list2(...), .which)

Arguments

.data

The gt table group object

⁠obj:<gt_group>⁠ // required

This is a gt_group container object. It is typically generated through use of the gt_group() function along with one or more gt_tbl objects, or, made by splitting a gt table with gt_split().

...

One or more gt table objects

⁠obj:<gt_tbl>⁠ // required (or, use ...)

One or more gt table (gt_tbl) objects, typically generated via the gt() function.

.list

Alternative to ...

⁠<list of multiple expressions>⁠ // (or, use ...)

Allows for the use of a list as an input alternative to ....

.which

The tables to replace

⁠vector<numeric|integer>⁠ // default: NULL (optional)

A vector of index values denoting which gt tables should be replaced inside of the gt_group object.

Value

An object of class gt_group.

Function ID

14-6

Function Introduced

v0.9.0 (Mar 31, 2023)

See Also

Other table group functions: grp_add(), grp_clone(), grp_options(), grp_pull(), grp_rm(), gt_group(), gt_split()


gt documentation built on Oct. 7, 2023, 9:07 a.m.