8000 Consider changing `epi_slide_opt` output col naming scheme to match `dplyr::across` · Issue #665 · cmu-delphi/epiprocess · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Consider changing epi_slide_opt output col naming scheme to match dplyr::across #665
Open
@brookslogan

Description

@brookslogan

dplyr::across has a .names arg that similarly routes to glue. Maybe we should match to remove the X ways to do things, and also get closer to actual across support.

Musing: One annoyance with the dplyr::across interface is that, if you have multiple functions and you want heterogeneous naming schemes, it doesn't naturally support it; you have to use the same glue expression for everything, and it also adds numbers as the names for functions/formulas "without" a name, so it's not obviously convenient to produce an output column with the same name as an input column + another output column with auxiliary info and a suffix. [A solution here is to do .names = {paste0(.col, c("", "_suffix")).] We currently have a non-glue .new_col_names arg that would support that, but it's also less of an issue since we don't allow overwriting columns anyway, and don't allow multiple functions at once. Nevertheless, we could think about supporting .names being a vector of glue expressions in addition to just a single glue expression. If we don't move to .names, we might think about supporting vectors of glue expressions in .prefix and .suffix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0