fp_extract_labels: Extract labels from a forestplot object

View source: R/fp_extract_labeltext.R

fp_extract_labelsR Documentation

Extract labels from a forestplot object

Description

Rebuild label columns on an existing gforge_forestplot object using selectors mapped in a pipe-friendly style.

Usage

fp_extract_labels(x, ..., na = "")

Arguments

x

A gforge_forestplot object.

...

Named mappings where each name is the output label column name and each value is a selector for one source column.

na

Replacement value for missing values in atomic scalar cells.

Details

This helper requires that the plot object was created from a data frame via forestplot.data.frame() or forestplot.grouped_df() so that source data are available.

Value

A modified gforge_forestplot object.

Examples

data(inventors_vs_mello)
inventors_vs_mello |>
    forestplot(mean = est, lower = lb, upper = ub, labeltext = author) |>
    fp_extract_labels(Study = author, E1 = ai, N1 = n1i, E2 = ci, N2 = n2i)

forestplot documentation built on March 4, 2026, 9:06 a.m.