write_regression_to_excel: Write a regression to Excel

Description Usage Arguments Value Examples

Description

Writes a list of dataframe objects to an Excel workbook.

Usage

1
2
write_regression_to_excel(reg_models, workbook_fname, sheet_names,
  title_names = TRUE)

Arguments

reg_models

regression models, as a list

workbook_fname

workbook file name to save to

sheet_names

formatted names of sheets

title_names

whether to title format variable names

Value

nothing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Basic Example
mod <- lm(mpg ~ cyl, mtcars)
## Not run: 
write_regression_to_excel(mod, 'simple_reg.xlsx')

## End(Not run)
# Writing a list of regressions
mod_hp <- lm(mpg ~ hp, mtcars)

mod_list <- list(mod_cyl = mod, mod_hp = mod_hp)
## Not run: 
write_regression_to_excel(mod_list, 'mpg_regs.xlsx')

write_regression_to_excel(mod_list, 'simple_reg.xlsx', c("Cylinder Model", "HP Model"))

## End(Not run)

KevinRPan/handy documentation built on May 4, 2019, 2:34 p.m.