Skip to content

[feature request] detect and respect names #86

@dhicks

Description

@dhicks

If here() is passed a named character vector, the names are discarded.

library(here)

foo = c(a = '1', b = '2')
here(foo)

Detecting names, and passing them along to the output, would be useful for pipes that start by searching for files and then opening them, eg,

list.files(data_dir, 'csv') |> 
    set_names() |>
    here(data_dir, _) |> 
    map_dfr(read_csv, .id = 'file')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions