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


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.


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



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.


Alternative to ...

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

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


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.


An object of class gt_group.

Function ID


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 June 22, 2024, 11:11 a.m.