TableBlock: 'TableBlock'

TableBlockR Documentation

TableBlock

Description

Specialized FileBlock for managing table content in reports. It's designed to handle various table formats, converting them into a consistent, document-ready format (e.g., flextable) for inclusion in reports.

Super classes

teal.reporter::ContentBlock -> teal.reporter::FileBlock -> TableBlock

Methods

Public methods

Inherited methods

Method new()

Initialize a TableBlock object.

Usage
TableBlock$new(table)
Arguments
table

(data.frame or rtables or TableTree or ElementaryTable or listing_df) a table assigned to this TableBlock

Returns

Object of class TableBlock, invisibly.


Method set_content()

Sets content of this TableBlock.

Usage
TableBlock$set_content(content)
Arguments
content

(data.frame or rtables or TableTree or ElementaryTable or listing_df) a table assigned to this TableBlock

Details

Raises error if argument is not a table-like object.

Returns

self, invisibly.

Examples
TableBlock <- getFromNamespace("TableBlock", "teal.reporter")
block <- TableBlock$new()
block$set_content(iris)


Method clone()

The objects of this class are cloneable with this method.

Usage
TableBlock$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `TableBlock$set_content`
## ------------------------------------------------

TableBlock <- getFromNamespace("TableBlock", "teal.reporter")
block <- TableBlock$new()
block$set_content(iris)


teal.reporter documentation built on April 3, 2025, 7:39 p.m.