coin2Excel: Write a COIN to Excel

Description Usage Arguments Value Examples

View source: R/coin_2excel.R

Description

Takes a COIN and writes all main data tables and other things to an Excel file. This uses the 'openxlsx' package.

Usage

1
coin2Excel(COIN, fname = "COINresults.xlsx")

Arguments

COIN

A COIN object

fname

The file name to write to, as a character string

Value

An Excel workbook with each table on a separate named tab.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Here we write a COIN to Excel, but this is done to a temporary directory
## to avoid "polluting" the working directory when running automatic tests.
## In a real case, set fname to a directory of your choice.
ASEM <- build_ASEM()
# write to Excel in temporary directory
coin2Excel(ASEM, fname = paste0(tempdir(), "\\ASEM_results.xlsx"))
# spreadsheet is at:
print(paste0(tempdir(), "\\ASEM_results.xlsx"))
# now delete temporary file to keep things tidy in testing
unlink(paste0(tempdir(),"\\ASEM_results.xlsx"))

COINr documentation built on Nov. 30, 2021, 9:06 a.m.