kc_regxls: Export regression output to Excel file

View source: R/kc_regxls.R

kc_regxlsR Documentation

Export regression output to Excel file

Description

Export a list of regression output to a table within an Excel sheet; depends on modelsummary, openxlsx, dplyr, and purrr.

Usage

kc_regxls(
  reglist,
  sname = NULL,
  coef_map = NULL,
  gof_map = NULL,
  add_rows = NULL,
  add_notes = NULL,
  cols_lbl = NULL,
  mc_cores = 1,
  num_fmt = "%.3f",
  fpath = NULL,
  fname = "~/Desktop/kc_mod_all.xlsx",
  overwrite = TRUE
)

Arguments

reglist

A list of regression output using base::lm() or fixest::feols()

sname

A string for the sheet title

coef_map

Model estimates to report; using modelsummary's coef_map argument

gof_map

Model diagnostics to report; using modelsummary's gof_map argument

add_rows

Data frame of rows to be appended; using modelsummary's add_rows argument

add_notes

A vector of table notes to append at the bottom of the table

cols_lbl

A vector of column titles to appear on the top row of the table

mc_cores

Parallel computation of model diagnostics; using modelsummary's mc.cores argument

num_fmt

Format of numeric values; using modelsummary's fmt argument

fpath

File path for output; deprecated - use fname exclusively

fname

File name for output

overwrite

If TRUE then overwrites file; if FALSE then appends sheet on existing file


kennchua/kctools documentation built on Aug. 28, 2024, 8:37 a.m.