components.figure: Extract components of a figure, mdtable, mdexpr or mdlink...

View source: R/oop.R

components.figureR Documentation

Extract components of a figure, mdtable, mdexpr or mdlink object.

Description

Accesses specific components of an object specified by the 'what' argument or plots it.

Usage

## S3 method for class 'figure'
components(
  object,
  what = c("plot", "label", "w", "h", "unit", "ref_name", "caption", "legend_text"),
  ...
)

## S3 method for class 'figure'
plot(x, ...)

## S3 method for class 'mdtable'
components(object, what = c("label", "ref_name", "caption"), ...)

## S3 method for class 'mdexpr'
components(
  object,
  what = c("quosure", "expression", "result", "ref_name", "caption"),
  ...
)

## S3 method for class 'mdlink'
components(object, what = c("ref_name", "URL"), ...)

Arguments

object

an object.

what

The requested feature. 'plot': the ggplot, 'label': the rendering/saving label, 'h': rendering height, 'w': the rendering width, 'unit': the rendering unit, 'ref_name': reference name used in R markdown, 'caption' object reference caption used in R markdown, 'legend_text' extended legend text used in R markdown. 'quosure': the quosure, 'expression': R expression, 'result': the evaluation result, 'URL': the link's URL.

...

extra arguments, currently none.

x

an object.

Value

The requested feature


PiotrTymoszuk/figur documentation built on July 16, 2024, 1:15 a.m.