tabulr -- Write out tabular R datatructures to Excel.
Goal is a set of robust functions that can take a list of R-objects containing a tabular structure, and write it to Excel using sensible layout and styling defaults.
Such tabular structure are for instance crosstables, output from syvtable()
and table()
, a table of descriptives or model parameters, a dataframe, etc.
library(openxlsx)
source('table_export_openxlsx.r')
wb <- createWorkbook()
addWorksheet(wb = wb, sheetName = 'OR_tables', gridLines = FALSE)
wb <- print.tabulars.xlsx(wb, 1, list(tab1, tab2, tab3))
saveWorkbook(wb, "OR1_descr_tables.xlsx")
Resulting Excel-file: OR1_descr_tables.xlsx
- rewrite functions using openxlsx.
- basic layout routine for row & col names, row and col margins, captions and comments.
- minimal styling based on LaTex tables
- auto column resizing (in progress, cf. issue #43)
- easy setters and getters for tabular properties (e.g.
caption()
,comment()
) - setting (sub)section headings in sheets
- optional: cell highlighting for significance-tests?
- optional: multilingual strings support?