df_to_excel: Function df_to_excel

Description Usage Arguments Value Author(s) Examples

View source: R/df_to_excel.R

Description

Take a dataframe with rownames and output to an Excel spreadsheet. Freezes the row and colnames and sets columns into Excel filter mode.

Usage

1
2
3
4
5
6
7
8
9
df_to_excel(
  df,
  filename,
  sheetname = "data",
  widthFirstCol = 40,
  widthOtherCol = 10,
  baseFontSize = 10,
  useRownames = TRUE
)

Arguments

df

A dataframe with rownames and colnames (Required).

filename

Path/Filename for output (Required).

sheetname

Name for the Excel sheet (Default = "data")

widthFirstCol

width of 1st column (rownames) (Default=40)

widthOtherCol

width of 1st column (rownames) (Default=10)

baseFontSize

base font for Excel file (Default=10)

useRownames

Creates a spreadsheet without rownames (default=TRUE). Set to FALSE when there is no column suitably unique to use for rownames

Value

Writes an Excel file to the specified file.

Author(s)

John Thompson, jrt@thompsonclan.org

Examples

1
2
3
#merge a set of topTable contrasts into one data.frame
MyContrastTable  = topTable.merge (topTablelist)
df_to_excel(MyContrastTable, "myExcelFile.xlsx")

jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.