as.xlsx.artifact: Convert Audit Artifacts to Excel Workbook

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/audited.R

Description

These functions save a collection of artifacts as an Excel 2007 workbook, optionally as a file, using package xlsx.

Usage

1
2
3
4
## S3 method for class 'audited'
as.xlsx(x, file = NULL, ...)
## S3 method for class 'artifact'
as.xlsx(x, names, file = NULL, simplify = TRUE, gc = FALSE, ...)

Arguments

x

an audited object, or its artifact

names

names for the workbook sheets

file

a filename for the workbook

simplify

whether to drop artifacts with no rows

gc

whether to attempt garbage collection

...

passed to called functions

Details

All the hard work is done by the artifact method, but typically one wants to call as.xlsx for an audited object so that names can be supplied automatically. In that case, they will be the vector arg.id from the audit table. Care is taken to make them unique.

If simplify is true, zero-row artifacts are ignored, and their names dropped if necessary. (Names vector can have the length either of the artifact list, or of the subset having 1 or more rows.)

If file is specified, the workbook is written to file and returned invisibly. The workbook can be assigned in an environment for further manipulation.

Value

a java pointer for a workbook, as for createWorkbook(); invisible if file is specified

Note

For particularly large work sheets, you may need to run, e.g., options(java.parameters = "-Xmx1000m") (see this) or options( java.parameters = "-Xmx4g" ) (see this) before the first call to as.xlsx. Also, you could pass gc = TRUE in the call, possibly with performance and memory tradeoffs.

Author(s)

Tim Bergsma

References

http://metrumrg.googlecode.com

See Also

Examples

1

audited documentation built on May 2, 2019, 4:45 p.m.