Skip to contents

Write a table group by variable into Excel

Usage

create_xlsx_group_x_variable(
  table_group_x_variable,
  table_name = "group_x_table",
  dataset_name = "dataset",
  file_path,
  table_sheet = "table_group_x_variable",
  dataset_sheet = "dataset",
  write_file = TRUE,
  overwrite = FALSE
)

Arguments

table_group_x_variable

a table create by create_table_group_x_variable

table_name

string with the name of table to write. It will only be used if it is part of a list. Default is "group_x_table".

dataset_name

string with the name of dataset to write. It will only be used if it is part of a list. Default is "dataset".

file_path

File path, it should contains the file name

table_sheet

string with the name of the sheet to write the table, default is "table_group_x_variable"

dataset_sheet

string with the name of the sheet to write the dataset, default is "dataset"

write_file

Default is TRUE, it will write the file. If set to FALSE, it will return a workbook object from openxlsx

overwrite

Default is FALSE, it will overwrite the file if set to TRUE.

Value

An excel file formatted.

Examples

if (FALSE) { # \dontrun{
presentresults_resultstable %>%
  create_table_group_x_variable() %>%
  create_xlsx_group_x_variable(file_path = "mytable.xlsx")
} # }