tbls2xls: write tables to xlsx

Description Usage Arguments Details Value

View source: R/drill.R

Description

tbls2xlsx takes a nested list of tables and writes them into a sheet in an xlsx workbook object, optionally saving it to file.

Usage

1
2
tbls2xls(tbls, filename = NULL, sheet = createSheet(wb, sheetName =
  "tables"), wb = createWorkbook())

Arguments

tbls

a (nested) list of tables

filename

path to write the results to

sheet

the sheet object to write the tables to

wb

the workbook in which to create or find the sheet

Details

Originally meant to save drill output to xlsx for making charts, this function traverses a (tree) list of tables and writes them, in the order encountered, into a single column on a sheet object from package xlsx. Each table must be a matrix and is written with a title formed from its position in the list, or if the attribute title is set, that is used. If sheet is not specified, a new one is created; if wb is not specified, a new one is created. If filename is specified, the resultant workbook is written to file.

Value

the resultant workbook object


mlgrm/svyr documentation built on May 11, 2017, 9:57 p.m.