Skip to content

.envir parameter treated differently between glue() and glue_data() #308

@ramiromagno

Description

@ramiromagno

From the help page of both functions it seems .envir parameter ought to be treated in the same way. But glue::glue_data() seems to be picky and won't slurp lists.

glue::glue("{country} is the best!", .envir = list(country = "Portugal"))
#> Portugal is the best!
glue::glue_data("{country} is the best!", .envir = list(country = "Portugal"))
#> Error in new.env(hash = hash, parent = parent, size = size): 'enclos' must be an environment

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