R/dots.R

Defines functions fix_auto_name

fix_auto_name <- function(dots) {
  if (is.null(names(dots))) {
    dots <- set_names(dots, "")
  }

  for (i in seq_along(dots)) {
    dot <- dots[[i]]
    if (names(dots)[[i]] == "") {
      quo_data <- attr(dot, "dplyr:::data")
      names(dots)[[i]] <- as_label(quo_data$name)
    }
  }

  dots
}
duckdblabs/duckplyr documentation built on Nov. 6, 2024, 10 p.m.