TableBlock {teal.reporter} | R 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
orrtables
orTableTree
orElementaryTable
orlisting_df
) a table assigned to thisTableBlock
Returns
Object of class TableBlock
, invisibly.
Method set_content()
Sets content of this TableBlock
.
Usage
TableBlock$set_content(content)
Arguments
content
(
data.frame
orrtables
orTableTree
orElementaryTable
orlisting_df
) a table assigned to thisTableBlock
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)