Skip to content

Commit

Permalink
Change default argument for ByGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienBlasco committed May 27, 2024
1 parent 293082a commit e3624ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/add_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ add_table <- function(
TableFootnote2 = "",
TableFootnote3 = "",
MergeCol = NULL,
ByGroup = NULL,
ByGroup = character(0),
GroupName = FALSE,
asTable = FALSE) {

Expand All @@ -51,7 +51,7 @@ add_table <- function(
assert_character1(TableFootnote2)
assert_character1(TableFootnote3)

if (asTable & !is.null(ByGroup)) {
if (asTable & length(ByGroup) > 0L) {
stop("asTable cannot be TRUE if ByGroup is defined")
}

Expand Down Expand Up @@ -98,7 +98,7 @@ add_table <- function(
}

# Add a table
if (is.null(ByGroup)) {
if (length(ByGroup) == 0L) {
writeDataFunction(
wb = WbTitle,
sheet = mysheet,
Expand Down
2 changes: 1 addition & 1 deletion R/toxlsx.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ toxlsx <- function(object,
footnote2 = list(),
footnote3 = list(),
mergecol = NULL,
bygroup = NULL,
bygroup = list(),
groupname = FALSE,
path,
filename = "Export",
Expand Down

0 comments on commit e3624ef

Please sign in to comment.