Learn R Programming

gofigR (version 1.1.3)

find_figure: Find a figure by name within an analysis.

Description

Searches the figures attached to a given analysis by name and optionally creates a new figure when no match is found. This is often the most convenient way to obtain a figure handle in scripts and notebooks.

Usage

find_figure(gf, analysis, name, description = NULL, create = FALSE)

Value

A figure object corresponding to the matching (or newly created) figure.

Arguments

gf

GoFigr client.

analysis

Parent analysis object (or environment) in which to look for the figure.

name

Name of the figure to find.

description

Optional description to use if a new figure must be created.

create

Logical; if `TRUE` and the figure doesn't exist, a new one is created. If `FALSE`, an error is thrown when no matching figure is found.