Skip to content

Support for lazy tibbles #242

Description

@mgirlich

Lazy tibbles currently have two issues with eval_select():

  1. They are not a vector so one has to simulate a "dummy" tibble with the appropriate column names, e.g with dtplyr:::simulate_vars().
  2. The column types are not generally known which is why allow_predicates would make sense: Optionally suppress use of predicates #226

The second point is still a bit annoying when trying to do some general work in a generic, e.g. in tidyr::nest() unnamed dots are tried to be named

tidyr::nest <- function (.data, ..., .names_sep = NULL, .key = deprecated()) {
  cols <- enquos(...)
  if (any(names2(cols) == "")) {
    col_names <- names(tidyselect::eval_select(expr(c(...)), .data))
    ...
  }
  UseMethod("nest")
}

So, it would be necessary to check the type to figure out whether allow_predicate should be TRUE or FALSE. It might make sense if tidyselect() could handle this.

Also see tidyverse/tidyr#1134

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions