write.simple.xlsx: Write Simple XLSX

View source: R/ReadWriter.R

write.simple.xlsxR Documentation

Write Simple XLSX

Description

Write out a list of matrices or data frames with row and column names to an Excel (.xlsx) file. The output filename is generated based on the provided parameters and stored in the specified output directory or the current working directory. The function offers various styling and formatting options for the Excel file.

Usage

write.simple.xlsx(
  named_list,
  rowname_column = 1,
  filename = substitute(named_list),
  suffix = NULL,
  manual_file_name = NULL,
  manual_directory = NULL,
  o = FALSE,
  TabColor = "darkgoldenrod1",
  HeaderLineColor = "darkolivegreen3",
  HeaderCex = 12,
  Creator = "",
  HeaderCharStyle = c("bold", "italic", "underline")[1],
  has_row_names = TRUE,
  FreezeFirstRow = TRUE,
  FreezeFirstCol = FALSE,
  v = TRUE
)

Arguments

named_list

A list of data frames or matrices to write out. Default: No default value, a list must be provided.

rowname_column

The column name or index to use as row names in the Excel file. Required, no default value.

filename

The base name for the output file, derived from the 'named_list' variable if not specified. Default: Derived using 'substitute(named_list)'.

suffix

A suffix to be added to the output filename. Default: NULL.

manual_file_name

Manually defined filename, overrides automatic naming. Default: NULL.

manual_directory

Directory to save the file in, overrides default directory. Default: NULL.

o

Logical; if TRUE, opens the file after writing using the system's default application. Default: FALSE.

TabColor

Color for the tabs in Excel. Default: 'darkgoldenrod1'.

HeaderLineColor

Color for the header line. Default: 'darkolivegreen3'.

HeaderCex

Font size for the header. Default: 12.

Creator

The creator of the Excel document. Default: ”.

HeaderCharStyle

Character style for the header (e.g., 'bold', 'italic', 'underline'). Default: 'bold'.

has_row_names

Logical; if set to FALSE, converts the first column to row names. Default: TRUE

FreezeFirstRow

Logical; if TRUE, freezes the first row in Excel. Default: TRUE.

FreezeFirstCol

Logical; if TRUE, freezes the first column in Excel. Default: FALSE.

v

verbose Print path? Default: TRUE.

See Also

write.xlsx

Examples

## Not run: 
if (interactive()) {
  # Example usage:
  # write.simple.xlsx(my.list.of.data.frames, rowname_column = "gene")
}

## End(Not run)

vertesy/ReadWriter documentation built on Nov. 24, 2024, 10:40 p.m.