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

gt_group() 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 grp_replace(). 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 gt_group() 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 .list)

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()


rstudio/gt documentation built on Dec. 2, 2024, 11:05 a.m.