Skip to content

Commit

Permalink
small refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
Enchufa2 committed Jan 19, 2025
1 parent 2489979 commit 7edd528
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ cbind.units <- function(..., deparse.level = 1) {
}

.deparse <- function(dots, symarg, deparse.level) {
if (!is.null(names(dots))) return(dots)

deparse.level <- as.integer(deparse.level)
if (identical(deparse.level, -1L)) deparse.level <- 0L # R Core's hack
stopifnot(0 <= deparse.level, deparse.level <= 2)
Expand All @@ -184,7 +182,9 @@ cbind.units <- function(..., deparse.level = 1) {
Nms <- function(i) { if(!is.null(s <- names(symarg)[i]) && nzchar(s)) s else nm(i) }

symarg <- as.list(symarg)[-1L]
names(dots) <- sapply(seq_along(dots), Nms)
dnames <- sapply(seq_along(dots), Nms)
if (!all(sapply(dnames, is.null)))
names(dots) <- dnames
dots
}

Expand Down

0 comments on commit 7edd528

Please sign in to comment.