tangram0.8.3 package

The Grammar of Tables

add_footnote

Add a footnote to a table

add_indent

Add indentations to left column row headers

args_flatten

Flatten variable arguments

as.categorical

Convert data type to a factor if it's not already

ASTBranch

A left/right branch in an Abstract Syntrax Tree. This inherits from AS...

ASTFunction

A specified function call as an ASTNode

ASTMultiply

The multiplication of two terms, as an ASTNode.

ASTNode

A Node in an Abstract Syntax Tree (AST)

ASTPlus

The addition of two terms, in an ASTNode.

ASTTableFormula

The root ASTNode of a formula.

ASTVariable

A Variable in an Abstract Syntax Tree (AST)

cbind.tangram

A cbind for generated table tangram objects.

cell

Construct a table cell from an object

cell_header

Create a cell_header object of the given text.

cell_label

Create an cell_label (S3) object of the given text.

cell_n

Create an cell_n (S3) object of the given statistic

cell_subheader

Create a cell_subheader object of the given text.

cell_transform

Create a function to transform all cells of a table

csv

Generate an csv from a tangram or cell object

custom_css

Return a CSS file as a string

del_col

Delete given column(s) from a table

del_row

Delete a row(s) from a table

derive_label

Derive label of AST node.

drop_statistics

Drop all statistics columns from a table.

format_guess

Guess the best format for a given set of numerical data

hmisc

Style Bundle for Hmisc defaults

hmisc_cell

Cell Generation functions for hmisc default

hmisc_data_type

Determine data type of a vector loosely consistent with Hmisc.

hmisc_intercept_cleanup

Cleanup an intercept only model

html5.cell

Convert an abstract cell object into an HTML5 string

html5.cell_header

Convert an abstract cell_header object into an HTML5 string

html5.cell_label

Convert a cell_label object into an HTML5 string

html5.cell_n

Convert an abstract cell_n object into an HTML5 string

html5.cell_subheader

Convert an abstract cell_subheader object into an HTML5 string

html5.character

Default conversion to HTML5 for a character cell

html5.default

Default conversion to HTML5 for an abstract table element

html5.logical

Default conversion to HTML5 for a logical cell

html5

S3 html5 Method function for use on a tangram to generate HTML5

html5.tangram

Convert a tangram class into an HTML5 string

index.cell_label

Generate an index from a label object

index.default

Generate an index from a cell object

index.list

Generate an index from a list object

index

Generate an index from a tangram or cell object

index.tangram

Generate an an index from a tangram object

insert_column

Insert a column into a tangram table

insert_row

Insert a row into a tangram table

is.binomial

Determine if a vector is binomial or not

is.categorical

Determine if a vector is categorical or not

key

Key derivation helper function

lancet

Style Bundle for Lancet style

lancet_cell

Cell Generation functions for Lancet styling

lancet_fraction

Create an cell_fraction (S3) in NEJM style of the given data

lancet_mean_sd

Create a mean/sd cell object of the given data in Lancet style

latex

Render to LaTeX methods for tangram cell objects

latex_template

Return a LaTeX template that works with tangram

latexify

LaTeX safe string conversion

nejm

Style Bundle for Closer to NEJM style

nejm_cell

Cell Generation functions for nejm default

nejm_fraction

Create an cell_fraction (S3) in NEJM style of the given data

nejm_iqr

Create a interquartile range cell object of the given data NEJM style

nejm_range

Create a NEJM style range

Parser

The parser class for generating abstract syntax trees for given table ...

pipe.tangram

Provide a "|" operator for cbind of tangram tables

plus-.tangram

Provide a "+" operator for rbind of tangram tables

print

Print methods for tangram objects

proc_tab

Tangram transform for proc_tab style summaries via a function

rbind.tangram

An rbind for generated tables tangram objects.

render_f

Format a vector of provided numeric values

render_route_tangram

Router for rendering method

replace_cell

Replace a cell's contents

rmd

Generate an Rmd table entry from a cell object

rowscols

S3 object to return number of rows/cols in object

rtf.cell

Given a cell class create an RTF representation.

rtf.cell_chi2

Convert an abstract cell_chi2 object into an rtf string

rtf.cell_fstat

Convert an abstract cell_fstat object into an RTF string

rtf.cell_header

Convert an abstract cell_header object into an RTF string

rtf.cell_iqr

Convert an abstract cell_iqr object into an RTF string

rtf.cell_label

Given a cell_label class create an RTF representation.

rtf.cell_n

Convert an abstract cell_n object into an RTF string

rtf.cell_subheader

Convert an abstract cell_subheader object into an RTF string

rtf.default

Default conversion to RTF for an abstract table element

rtf

S3 rtf Method function for use on abstract table class

rtf.tangram

Convert a tangram into an RTF string or file

select_col

Select given column(s) from a table

select_row

Select given row(s) from a table

smd

List of lists, should contain a "Type" entry with a function to determ...

smd_cell

Cell Generation functions for SMD comparisons of categorical to numeri...

smd_compare

Create a SMD for a categorical set of column versus a numerical row

smd_contingency

Create a contingency table with SMD given a row column of a formula

smd_dist

Create an SMD distance cell

smd_fraction

Create a fraction cell in the smd transform

smd_meansd

Create an SMD mean and standard deviation cell

standard_difference

Compute the standardized mean distance between 2 groups for numerical ...

summarize_nejm_horz

Create a summarization for a categorical set of column versus a numeri...

summarize_nejm_vert

Create a summarization for a categorical row versus X numerical column

summary

The default method for rendering tangram objects

table_builder

A set of magrittr operators for tangram tables

table_flatten

Given a tangram object with embedded tables, flattens to a single tabl...

tangram

Table creation methods

Token

A token in the formula grammar

Provides an extensible formula system to quickly and easily create production quality tables. The processing steps are a formula parser, statistical content generation from data as defined by formula, followed by rendering into a table. Each step of the processing is separate and user definable thus creating a set of composable building blocks for highly customizable table generation. A user is not limited by any of the choices of the package creator other than the formula grammar. For example, one could chose to add a different S3 rendering function and output a format not provided in the default package, or possibly one would rather have Gini coefficients for their statistical content in a resulting table. Routines to achieve New England Journal of Medicine style, Lancet style and Hmisc::summaryM() statistics are provided. The package contains rendering for HTML5, Rmarkdown and an indexing format for use in tracing and tracking are provided.

  • Maintainer: Shawn Garbett
  • License: GPL-3
  • Last published: 2025-07-31