View source: R/data_functions.R
writeTables | R Documentation |
Write a dataframe or a named list of dataframes to a .xlsx file
Write a dataframe or a named list of dataframes to a .xlsx file
writeTables(
data,
file,
rowNames = TRUE,
adjwidths = TRUE,
header = "bold",
scale_styles = NULL,
condition_styles = NULL,
highlight_styles = NULL,
check = FALSE,
...
)
data |
dataframe or a named list of dataframes |
file |
file |
rowNames |
print rownames to sheet |
adjwidths |
adjust column widths |
header |
format headers in bold font |
scale_styles |
color gradient styles, e.g. scale_styles = list(NES = c("#6200d0" = -1, "#ffffff" = 0, "#ffca0a" = 1)) |
condition_styles |
conditional highlighting styles, e.g. condition_styles = list(padj = c(fontColour = "#ff2222", rule = "<=0.05")) |
highlight_styles |
value highlighting styles, e.g. highlight_styles = list(genes = list(fgFill = "#3be1ff", values = c("MTOR", "EGFR"))) |
check |
test if .xlsx file can be re-imported without changes to data |
... |
openxlsx::writeData
openxlsx::writeData
writeTables(mtcars, file = "example.xlsx")
writeTables(list(mtcars = mtcars, iris = iris), file = "example.xlsx")
Write dataframes to .xlsx file
writeTables(mtcars, file = "example.xlsx")
writeTables(list(mtcars = mtcars, iris = iris), file = "example.xlsx")et
writeTables(mtcars, file = "example.xlsx", scale_styles = list(mpg = c("#ffffff", "#6200d0"), cyl = c("#ffffff" = 0, "#ffca0a" = 10)))
writeTables(mtcars, file = "example.xlsx", condition_styles = list(mpg = c(fontColour = "#6200d0", rule = ">20")))
writeTables(iris, file = "example.xlsx", highlight_styles = list(Species = list(fgFill = "#3be1ff", values = c("setosa", "virginica"))), rowNames = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.