Skip to content

Commit

Permalink
change default for wb_dims()
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Jul 15, 2023
1 parent 8c27886 commit c49350a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,17 @@ wb_dims <- function(...) {
col_names <- args$col_names
row_names <- args$row_names

has_cnam <- is.null(col_names)
has_rnam <- is.null(row_names)
cnam_null <- is.null(col_names)
rnam_null <- is.null(row_names)

if (has_cnam) col_names <- FALSE
if (has_rnam) row_names <- FALSE
if (cnam_null) col_names <- TRUE
if (rnam_null) row_names <- FALSE

assert_class(col_names, "logical")
assert_class(row_names, "logical")

# wb_dims(rows, cols)
if (length(args) == 2 && has_cnam && has_rnam) {
if (length(args) == 2 && cnam_null && rnam_null) {
rows <- 1L
cols <- 2L

Expand Down

0 comments on commit c49350a

Please sign in to comment.