The `PivotLatexRenderer` class creates a Latex representation of a pivot table.

Format

R6Class object.

Methods

Public methods


Method new()

Create a new `PivotLatexRenderer` object.

Usage

PivotLatexRenderer$new(parentPivot = NULL)

Arguments

parentPivot

The pivot table that this `PivotLatexRenderer` instance belongs to.

Returns

A new `PivotLatexRenderer` object.


Method clearIsRenderedFlags()

An internal method used when rendering a pivot table to Latex Clear the IsRendered flags that exist on the `PivotDataGroup` class.

Usage

PivotLatexRenderer$clearIsRenderedFlags()

Returns

No return value.


Method resetVisibleRange()

Clears the visible range that has been set, so the next call to `getTableLatex()` will render the whole table.

Usage

PivotLatexRenderer$resetVisibleRange()

Returns

No return value.


Method setVisibleRange()

Specifies a subset of the pivot table to be rendered, e.g. for use when a pivot table will not fit into a single A4 page.

Usage

PivotLatexRenderer$setVisibleRange(
  fromRow = NULL,
  toRow = NULL,
  fromColumn = NULL,
  toColumn = NULL
)

Arguments

fromRow

The row number to render from.

toRow

The row number to render to.

fromColumn

The column number to render from.

toColumn

The column number to render to.

Returns

No return value.


Method getTableLatex()

Generate a Latex representation of the pivot table.

Usage

PivotLatexRenderer$getTableLatex(
  caption = NULL,
  label = NULL,
  boldHeadings = FALSE,
  italicHeadings = FALSE,
  exportOptions = NULL
)

Arguments

caption

The caption to appear above the table.

label

The label to use when referring to the table elsewhere in the document

boldHeadings

Default `FALSE`, specify `TRUE` to render headings in bold.

italicHeadings

Default `FALSE`, specify `TRUE` to render headings in italic.

exportOptions

A list of additional export options - see the "A1. Appendix" for details.

Returns

A character variable containing the Latex representation of the pivot table.


Method clone()

The objects of this class are cloneable with this method.

Usage

PivotLatexRenderer$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# This class should only be created by the pivot table. # It is not intended to be created outside of the pivot table.