Skip to content

Commit

Permalink
simplify parse_dots()
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Nov 18, 2024
1 parent a40319e commit 6db5360
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/daemons.R
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,10 @@ parse_dots <- function(...) {
...length() || return("")
dots <- list(...)
dots <- dots[as.logical(lapply(dots, function(x) is.logical(x) || is.numeric(x)))]
length(dots) || return("")
dnames <- names(dots)
out <- sprintf(",%s", paste(dnames, dots, sep = "=", collapse = ","))
pos <- dnames == "output"
any(pos) && as.logical(dots[pos])[1L] && return(`attr<-`(out, "output", ""))
is.logical(dots[["output"]]) && dots[["output"]] && return(`attr<-`(out, "output", ""))
out
}

Expand Down

0 comments on commit 6db5360

Please sign in to comment.