pt_outputtype: Render budget table depending on doc type

View source: R/flex_tables.R

pt_outputtypeR Documentation

Render budget table depending on doc type

Description

Renders either a pivottabler pivot-table or flextable pivot-table based on type of document; the former in Latex documents, the latter otherwise

Usage

pt_outputtype(
  df,
  rowvec = NULL,
  colvec = NULL,
  calcrow = F,
  .ptsavename = NULL,
  .caption = NULL,
  deptadjust = F
)

Arguments

df

Budget dataframe to represent in budget table

rowvec

String column-names of the dataframe to add as row-groups to the pivot table; default NULL, for none

colvec

String columnn-names of the dataframe to add as column-groups to the pivot table; default NULL, for none

calcrow

Whether to display year columns of budget dataframe as rows of the pivot table; default F, so shown as columns

.ptsavename

Filename to save pivot table as in Excel document; default NULL, so not saved

.caption

Caption for pivot table; default NULL, so no caption

deptadjust

Whether including adotped budget information and comparisons for sharing of table with departments; default F, so adopted budget information excluded

Value

pivottabler pivot-table of budget data or flextable pivot-table of budget data


dpowerstp/tpbudget documentation built on June 3, 2022, 1:41 a.m.