toxlsx {tablexlsx} | R Documentation |
Convert R data frames to excel files
Description
This function allows you to write R data frames given
in the 'object' argument to excel files located in the 'path' directory.
The function takes several arguments but the only two required are 'object' and 'path'.
See examples gallery : <https://ddotta.github.io/tablexlsx/articles/aa-examples.html>
Usage
toxlsx(
object,
tosheet = list(),
title = list(),
columnstyle = list(default = NULL),
footnote1 = list(),
footnote2 = list(),
footnote3 = list(),
mergecol = NULL,
bygroup = list(),
groupname = FALSE,
path,
filename = "Export",
asTable = FALSE,
automaticopen = FALSE
)
Arguments
object |
data.frame to be converted to excel |
tosheet |
list of sheet names for each element of object. If omitted, sheets are named by default "Sheet 1", "Sheet 2"... |
title |
list of title for each element of object If omitted, title takes the name of the dataframe in 'object' |
columnstyle |
list of style for columns of each element of object Only useful if you want to customise the style of each column ' |
footnote1 |
list of footnote1 for each element of object If omitted, no footnote1 |
footnote2 |
list of footnote2 for each element of object If omitted, no footnote2 |
footnote3 |
list of footnote3 for each element of object If omitted, no footnote3 |
mergecol |
list of character vectors that indicate the columns for which we want to merge the modalities |
bygroup |
list of character vectors indicating the names of the columns by which to group |
groupname |
list of booleans indicating whether the names of the grouping variables should be written |
path |
path to save excel file |
filename |
name for the excel file ("Export" by default) |
asTable |
logical indicating if data should be written as an Excel Table (FALSE by default) |
automaticopen |
logical indicating if excel file should open automatically (FALSE by default) |
Value
an excel file
Examples
# Simply export a data frame to an xlsx file
# For more examples, see examples gallery :
# https://ddotta.github.io/tablexlsx/articles/aa-examples.html
## Not run:
toxlsx(object = iris, path = tempdir())
## End(Not run)